| 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 i < flow_graph->guarded_fields()->length(); | 572 i < flow_graph->guarded_fields()->length(); |
| 573 i++) { | 573 i++) { |
| 574 const Field* field = (*flow_graph->guarded_fields())[i]; | 574 const Field* field = (*flow_graph->guarded_fields())[i]; |
| 575 field->RegisterDependentCode(code); | 575 field->RegisterDependentCode(code); |
| 576 } | 576 } |
| 577 } else { | 577 } else { |
| 578 function.set_unoptimized_code(code); | 578 function.set_unoptimized_code(code); |
| 579 function.SetCode(code); | 579 function.SetCode(code); |
| 580 ASSERT(CodePatcher::CodeIsPatchable(code)); | 580 ASSERT(CodePatcher::CodeIsPatchable(code)); |
| 581 } | 581 } |
| 582 if (parsed_function->HasDeferredPrefixes()) { |
| 583 GrowableObjectArray* prefixes = parsed_function->DeferredPrefixes(); |
| 584 LibraryPrefix& prefix = LibraryPrefix::Handle(); |
| 585 for (intptr_t i = 0; i < prefixes->Length(); i++) { |
| 586 prefix ^= prefixes->At(i); |
| 587 prefix.RegisterDependentCode(code); |
| 588 } |
| 589 } |
| 582 } | 590 } |
| 583 is_compiled = true; | 591 is_compiled = true; |
| 584 done = true; | 592 done = true; |
| 585 } else { | 593 } else { |
| 586 // We bailed out. | 594 // We bailed out. |
| 587 | 595 |
| 588 if (isolate->object_store()->sticky_error() == | 596 if (isolate->object_store()->sticky_error() == |
| 589 Object::branch_offset_error().raw()) { | 597 Object::branch_offset_error().raw()) { |
| 590 // Compilation failed due to an out of range branch offset in the | 598 // Compilation failed due to an out of range branch offset in the |
| 591 // assembler. We try again (done = false) with far branches enabled. | 599 // assembler. We try again (done = false) with far branches enabled. |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 const Object& result = | 959 const Object& result = |
| 952 Object::Handle(isolate->object_store()->sticky_error()); | 960 Object::Handle(isolate->object_store()->sticky_error()); |
| 953 isolate->object_store()->clear_sticky_error(); | 961 isolate->object_store()->clear_sticky_error(); |
| 954 return result.raw(); | 962 return result.raw(); |
| 955 } | 963 } |
| 956 UNREACHABLE(); | 964 UNREACHABLE(); |
| 957 return Object::null(); | 965 return Object::null(); |
| 958 } | 966 } |
| 959 | 967 |
| 960 } // namespace dart | 968 } // namespace dart |
| OLD | NEW |