| 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/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 "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| 11 #include "vm/compiler.h" | 11 #include "vm/compiler.h" |
| 12 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 13 #include "vm/deopt_instructions.h" | 13 #include "vm/deopt_instructions.h" |
| 14 #include "vm/il_printer.h" | 14 #include "vm/il_printer.h" |
| 15 #include "vm/instructions.h" |
| 15 #include "vm/locations.h" | 16 #include "vm/locations.h" |
| 16 #include "vm/object_store.h" | 17 #include "vm/object_store.h" |
| 17 #include "vm/parser.h" | 18 #include "vm/parser.h" |
| 18 #include "vm/stack_frame.h" | 19 #include "vm/stack_frame.h" |
| 19 #include "vm/stub_code.h" | 20 #include "vm/stub_code.h" |
| 20 #include "vm/symbols.h" | 21 #include "vm/symbols.h" |
| 21 #include "vm/verified_memory.h" | 22 #include "vm/verified_memory.h" |
| 22 | 23 |
| 23 namespace dart { | 24 namespace dart { |
| 24 | 25 |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 ASSERT(!block_order().is_empty()); | 1122 ASSERT(!block_order().is_empty()); |
| 1122 VisitBlocks(); | 1123 VisitBlocks(); |
| 1123 | 1124 |
| 1124 __ int3(); | 1125 __ int3(); |
| 1125 ASSERT(assembler()->constant_pool_allowed()); | 1126 ASSERT(assembler()->constant_pool_allowed()); |
| 1126 GenerateDeferredCode(); | 1127 GenerateDeferredCode(); |
| 1127 // Emit function patching code. This will be swapped with the first 13 bytes | 1128 // Emit function patching code. This will be swapped with the first 13 bytes |
| 1128 // at entry point. | 1129 // at entry point. |
| 1129 | 1130 |
| 1130 if (is_optimizing()) { | 1131 if (is_optimizing()) { |
| 1132 // Leave enough space for patching in case of lazy deoptimization from |
| 1133 // deferred code. |
| 1134 __ nop(ShortCallPattern::pattern_length_in_bytes()); |
| 1131 lazy_deopt_pc_offset_ = assembler()->CodeSize(); | 1135 lazy_deopt_pc_offset_ = assembler()->CodeSize(); |
| 1132 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP); | 1136 __ Jmp(*StubCode::DeoptimizeLazy_entry(), PP); |
| 1133 } | 1137 } |
| 1134 } | 1138 } |
| 1135 | 1139 |
| 1136 | 1140 |
| 1137 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, | 1141 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, |
| 1138 const StubEntry& stub_entry, | 1142 const StubEntry& stub_entry, |
| 1139 RawPcDescriptors::Kind kind, | 1143 RawPcDescriptors::Kind kind, |
| 1140 LocationSummary* locs) { | 1144 LocationSummary* locs) { |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1761 __ movups(reg, Address(RSP, 0)); | 1765 __ movups(reg, Address(RSP, 0)); |
| 1762 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); | 1766 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); |
| 1763 } | 1767 } |
| 1764 | 1768 |
| 1765 | 1769 |
| 1766 #undef __ | 1770 #undef __ |
| 1767 | 1771 |
| 1768 } // namespace dart | 1772 } // namespace dart |
| 1769 | 1773 |
| 1770 #endif // defined TARGET_ARCH_X64 | 1774 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |