| 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/code_patcher.h" | 9 #include "vm/code_patcher.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1400 default: | 1400 default: |
| 1401 UNREACHABLE(); | 1401 UNREACHABLE(); |
| 1402 return ""; | 1402 return ""; |
| 1403 } | 1403 } |
| 1404 } | 1404 } |
| 1405 | 1405 |
| 1406 | 1406 |
| 1407 void DeoptimizeAt(const Code& optimized_code, uword pc) { | 1407 void DeoptimizeAt(const Code& optimized_code, uword pc) { |
| 1408 ASSERT(optimized_code.is_optimized()); | 1408 ASSERT(optimized_code.is_optimized()); |
| 1409 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown; | 1409 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown; |
| 1410 const DeoptInfo& deopt_info = | 1410 uint32_t deopt_flags = 0; |
| 1411 DeoptInfo::Handle(optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason)); | 1411 const DeoptInfo& deopt_info = DeoptInfo::Handle( |
| 1412 optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason, &deopt_flags)); |
| 1412 ASSERT(!deopt_info.IsNull()); | 1413 ASSERT(!deopt_info.IsNull()); |
| 1413 const Function& function = Function::Handle(optimized_code.function()); | 1414 const Function& function = Function::Handle(optimized_code.function()); |
| 1414 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); | 1415 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); |
| 1415 ASSERT(!unoptimized_code.IsNull()); | 1416 ASSERT(!unoptimized_code.IsNull()); |
| 1416 // The switch to unoptimized code may have already occurred. | 1417 // The switch to unoptimized code may have already occurred. |
| 1417 if (function.HasOptimizedCode()) { | 1418 if (function.HasOptimizedCode()) { |
| 1418 function.SwitchToUnoptimizedCode(); | 1419 function.SwitchToUnoptimizedCode(); |
| 1419 } | 1420 } |
| 1420 // Patch call site (lazy deoptimization is quite rare, patching it twice | 1421 // Patch call site (lazy deoptimization is quite rare, patching it twice |
| 1421 // is not a performance issue). | 1422 // is not a performance issue). |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1626 field.RecordStore(value); | 1627 field.RecordStore(value); |
| 1627 } | 1628 } |
| 1628 | 1629 |
| 1629 | 1630 |
| 1630 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { | 1631 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { |
| 1631 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); | 1632 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); |
| 1632 field.EvaluateInitializer(); | 1633 field.EvaluateInitializer(); |
| 1633 } | 1634 } |
| 1634 | 1635 |
| 1635 } // namespace dart | 1636 } // namespace dart |
| OLD | NEW |