| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/code_generator.h" | 5 #include "vm/code_generator.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
| 9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 | 1212 |
| 1213 const Code& optimized_code = Code::Handle(function.CurrentCode()); | 1213 const Code& optimized_code = Code::Handle(function.CurrentCode()); |
| 1214 // The current code will not be changed in the case that the compiler | 1214 // The current code will not be changed in the case that the compiler |
| 1215 // bailed out during OSR compilation. | 1215 // bailed out during OSR compilation. |
| 1216 if (optimized_code.raw() != original_code.raw()) { | 1216 if (optimized_code.raw() != original_code.raw()) { |
| 1217 // The OSR code does not work for calling the function, so restore the | 1217 // The OSR code does not work for calling the function, so restore the |
| 1218 // unoptimized code. Patch the stack frame to return into the OSR | 1218 // unoptimized code. Patch the stack frame to return into the OSR |
| 1219 // code. | 1219 // code. |
| 1220 uword optimized_entry = | 1220 uword optimized_entry = |
| 1221 Instructions::Handle(optimized_code.instructions()).EntryPoint(); | 1221 Instructions::Handle(optimized_code.instructions()).EntryPoint(); |
| 1222 function.SetCode(original_code); | 1222 function.AttachCode(original_code); |
| 1223 frame->set_pc(optimized_entry); | 1223 frame->set_pc(optimized_entry); |
| 1224 } | 1224 } |
| 1225 } | 1225 } |
| 1226 } | 1226 } |
| 1227 | 1227 |
| 1228 | 1228 |
| 1229 DEFINE_RUNTIME_ENTRY(TraceICCall, 2) { | 1229 DEFINE_RUNTIME_ENTRY(TraceICCall, 2) { |
| 1230 const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(0)); | 1230 const ICData& ic_data = ICData::CheckedHandle(arguments.ArgAt(0)); |
| 1231 const Function& function = Function::CheckedHandle(arguments.ArgAt(1)); | 1231 const Function& function = Function::CheckedHandle(arguments.ArgAt(1)); |
| 1232 DartFrameIterator iterator; | 1232 DartFrameIterator iterator; |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 // of the given value. | 1548 // of the given value. |
| 1549 // Arg0: Field object; | 1549 // Arg0: Field object; |
| 1550 // Arg1: Value that is being stored. | 1550 // Arg1: Value that is being stored. |
| 1551 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { | 1551 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) { |
| 1552 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 1552 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
| 1553 const Object& value = Object::Handle(arguments.ArgAt(1)); | 1553 const Object& value = Object::Handle(arguments.ArgAt(1)); |
| 1554 field.UpdateGuardedCidAndLength(value); | 1554 field.UpdateGuardedCidAndLength(value); |
| 1555 } | 1555 } |
| 1556 | 1556 |
| 1557 } // namespace dart | 1557 } // namespace dart |
| OLD | NEW |