yeah that's not good.
Haldean Brown
5 years ago
424 | 424 | { |
425 | 425 | check_job = (struct ubik_compile_job *) |
426 | 426 | cenv->to_compile.elems[i]; |
427 | ||
428 | /* TODO: this is not sufficient! if this happens, we need to | |
429 | * pull this one to the top of the stack; if module A depends | |
430 | * on modules B and C, after loading A's AST you have: | |
431 | * [bottom] A B C [top] | |
432 | * If, in the process of loading C's AST, we discover it | |
433 | * depends on B, it is not sufficient to leave the stack as-is, | |
434 | * because it will lead to us attempting to compile C before B, | |
435 | * which will raise an error. It means we need to bring B back | |
436 | * up to the top, to make the stack: | |
437 | * [bottom] A C B [top] | |
438 | */ | |
427 | 439 | if (strcmp(check_job->request->source_name, src) == 0) |
428 | 440 | return OK; |
429 | 441 | } |