OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 i < flow_graph->guarded_fields()->length(); | 568 i < flow_graph->guarded_fields()->length(); |
569 i++) { | 569 i++) { |
570 const Field* field = (*flow_graph->guarded_fields())[i]; | 570 const Field* field = (*flow_graph->guarded_fields())[i]; |
571 field->RegisterDependentCode(code); | 571 field->RegisterDependentCode(code); |
572 } | 572 } |
573 } else { | 573 } else { |
574 function.set_unoptimized_code(code); | 574 function.set_unoptimized_code(code); |
575 function.SetCode(code); | 575 function.SetCode(code); |
576 ASSERT(CodePatcher::CodeIsPatchable(code)); | 576 ASSERT(CodePatcher::CodeIsPatchable(code)); |
577 } | 577 } |
| 578 if (parsed_function->HasDeferredPrefixes()) { |
| 579 GrowableObjectArray* prefixes = parsed_function->DeferredPrefixes(); |
| 580 LibraryPrefix& prefix = LibraryPrefix::Handle(); |
| 581 for (intptr_t i = 0; i < prefixes->Length(); i++) { |
| 582 prefix ^= prefixes->At(i); |
| 583 prefix.RegisterDependentCode(code); |
| 584 } |
| 585 } |
578 } | 586 } |
579 is_compiled = true; | 587 is_compiled = true; |
580 done = true; | 588 done = true; |
581 } else { | 589 } else { |
582 // We bailed out. | 590 // We bailed out. |
583 | 591 |
584 if (isolate->object_store()->sticky_error() == | 592 if (isolate->object_store()->sticky_error() == |
585 Object::branch_offset_error().raw()) { | 593 Object::branch_offset_error().raw()) { |
586 // Compilation failed due to an out of range branch offset in the | 594 // Compilation failed due to an out of range branch offset in the |
587 // assembler. We try again (done = false) with far branches enabled. | 595 // assembler. We try again (done = false) with far branches enabled. |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 const Object& result = | 955 const Object& result = |
948 Object::Handle(isolate->object_store()->sticky_error()); | 956 Object::Handle(isolate->object_store()->sticky_error()); |
949 isolate->object_store()->clear_sticky_error(); | 957 isolate->object_store()->clear_sticky_error(); |
950 return result.raw(); | 958 return result.raw(); |
951 } | 959 } |
952 UNREACHABLE(); | 960 UNREACHABLE(); |
953 return Object::null(); | 961 return Object::null(); |
954 } | 962 } |
955 | 963 |
956 } // namespace dart | 964 } // namespace dart |
OLD | NEW |