| 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 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 __ nop(1); | 1279 __ nop(1); |
| 1280 __ nop(1); | 1280 __ nop(1); |
| 1281 AddCurrentDescriptor(PcDescriptors::kReturn, | 1281 AddCurrentDescriptor(PcDescriptors::kReturn, |
| 1282 instr->cid(), | 1282 instr->cid(), |
| 1283 instr->token_index(), | 1283 instr->token_index(), |
| 1284 CatchClauseNode::kInvalidTryIndex); // try-index. | 1284 CatchClauseNode::kInvalidTryIndex); // try-index. |
| 1285 } | 1285 } |
| 1286 | 1286 |
| 1287 | 1287 |
| 1288 void FlowGraphCompiler::VisitThrow(ThrowInstr* instr) { | 1288 void FlowGraphCompiler::VisitThrow(ThrowInstr* instr) { |
| 1289 LoadValue(RAX, instr->exception()); | 1289 ASSERT(instr->exception()->IsUse()); |
| 1290 __ pushq(RAX); | |
| 1291 GenerateCallRuntime(instr->cid(), | 1290 GenerateCallRuntime(instr->cid(), |
| 1292 instr->token_index(), | 1291 instr->token_index(), |
| 1293 instr->try_index(), | 1292 instr->try_index(), |
| 1294 kThrowRuntimeEntry); | 1293 kThrowRuntimeEntry); |
| 1295 __ int3(); | 1294 __ int3(); |
| 1296 } | 1295 } |
| 1297 | 1296 |
| 1298 | 1297 |
| 1299 void FlowGraphCompiler::VisitReThrow(ReThrowInstr* instr) { | 1298 void FlowGraphCompiler::VisitReThrow(ReThrowInstr* instr) { |
| 1300 LoadValue(RAX, instr->exception()); | 1299 ASSERT(instr->exception()->IsUse()); |
| 1301 __ pushq(RAX); | 1300 ASSERT(instr->stack_trace()->IsUse()); |
| 1302 LoadValue(RAX, instr->stack_trace()); | |
| 1303 __ pushq(RAX); | |
| 1304 GenerateCallRuntime(instr->cid(), | 1301 GenerateCallRuntime(instr->cid(), |
| 1305 instr->token_index(), | 1302 instr->token_index(), |
| 1306 instr->try_index(), | 1303 instr->try_index(), |
| 1307 kReThrowRuntimeEntry); | 1304 kReThrowRuntimeEntry); |
| 1308 __ int3(); | 1305 __ int3(); |
| 1309 } | 1306 } |
| 1310 | 1307 |
| 1311 | 1308 |
| 1312 | 1309 |
| 1313 void FlowGraphCompiler::VisitBranch(BranchInstr* instr) { | 1310 void FlowGraphCompiler::VisitBranch(BranchInstr* instr) { |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 | 1752 |
| 1756 | 1753 |
| 1757 void FlowGraphCompiler::FinalizeComments(const Code& code) { | 1754 void FlowGraphCompiler::FinalizeComments(const Code& code) { |
| 1758 code.set_comments(assembler_->GetCodeComments()); | 1755 code.set_comments(assembler_->GetCodeComments()); |
| 1759 } | 1756 } |
| 1760 | 1757 |
| 1761 | 1758 |
| 1762 } // namespace dart | 1759 } // namespace dart |
| 1763 | 1760 |
| 1764 #endif // defined TARGET_ARCH_X64 | 1761 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |