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/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 AstPrinter::PrintFunctionScope(parsed_function()); | 1052 AstPrinter::PrintFunctionScope(parsed_function()); |
1053 } | 1053 } |
1054 | 1054 |
1055 ASSERT(!block_order().is_empty()); | 1055 ASSERT(!block_order().is_empty()); |
1056 VisitBlocks(); | 1056 VisitBlocks(); |
1057 | 1057 |
1058 __ int3(); | 1058 __ int3(); |
1059 GenerateDeferredCode(); | 1059 GenerateDeferredCode(); |
1060 // Emit function patching code. This will be swapped with the first 13 bytes | 1060 // Emit function patching code. This will be swapped with the first 13 bytes |
1061 // at entry point. | 1061 // at entry point. |
1062 pc_descriptors_list()->AddDescriptor(PcDescriptors::kPatchCode, | 1062 AddCurrentDescriptor(PcDescriptors::kPatchCode, |
1063 assembler()->CodeSize(), | 1063 Isolate::kNoDeoptId, |
1064 Isolate::kNoDeoptId, | 1064 0); // No token position. |
1065 0, | |
1066 -1); | |
1067 __ jmp(&StubCode::FixCallersTargetLabel()); | 1065 __ jmp(&StubCode::FixCallersTargetLabel()); |
| 1066 AddCurrentDescriptor(PcDescriptors::kLazyDeoptJump, |
| 1067 Isolate::kNoDeoptId, |
| 1068 0); // No token position. |
| 1069 __ jmp(&StubCode::DeoptimizeLazyLabel()); |
1068 } | 1070 } |
1069 | 1071 |
1070 | 1072 |
1071 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, | 1073 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, |
1072 const ExternalLabel* label, | 1074 const ExternalLabel* label, |
1073 PcDescriptors::Kind kind, | 1075 PcDescriptors::Kind kind, |
1074 LocationSummary* locs) { | 1076 LocationSummary* locs) { |
1075 ASSERT(!IsLeaf()); | 1077 ASSERT(!IsLeaf()); |
1076 __ call(label); | 1078 __ call(label); |
1077 AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos); | 1079 AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1367 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
1366 __ Exchange(mem1, mem2); | 1368 __ Exchange(mem1, mem2); |
1367 } | 1369 } |
1368 | 1370 |
1369 | 1371 |
1370 #undef __ | 1372 #undef __ |
1371 | 1373 |
1372 } // namespace dart | 1374 } // namespace dart |
1373 | 1375 |
1374 #endif // defined TARGET_ARCH_X64 | 1376 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |