| 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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 __ nop(1); | 1225 __ nop(1); |
| 1226 __ nop(1); | 1226 __ nop(1); |
| 1227 AddCurrentDescriptor(PcDescriptors::kReturn, | 1227 AddCurrentDescriptor(PcDescriptors::kReturn, |
| 1228 instr->cid(), | 1228 instr->cid(), |
| 1229 instr->token_index(), | 1229 instr->token_index(), |
| 1230 CatchClauseNode::kInvalidTryIndex); // try-index. | 1230 CatchClauseNode::kInvalidTryIndex); // try-index. |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 | 1233 |
| 1234 void FlowGraphCompiler::VisitThrow(ThrowInstr* instr) { | 1234 void FlowGraphCompiler::VisitThrow(ThrowInstr* instr) { |
| 1235 ASSERT(instr->exception()->IsUse()); | 1235 // Moved to intermediate_language_x64.cc. |
| 1236 GenerateCallRuntime(instr->cid(), | 1236 UNREACHABLE(); |
| 1237 instr->token_index(), | |
| 1238 instr->try_index(), | |
| 1239 kThrowRuntimeEntry); | |
| 1240 __ int3(); | |
| 1241 } | 1237 } |
| 1242 | 1238 |
| 1243 | 1239 |
| 1244 void FlowGraphCompiler::VisitReThrow(ReThrowInstr* instr) { | 1240 void FlowGraphCompiler::VisitReThrow(ReThrowInstr* instr) { |
| 1245 ASSERT(instr->exception()->IsUse()); | 1241 // Moved to intermediate_language_x64.cc. |
| 1246 ASSERT(instr->stack_trace()->IsUse()); | 1242 UNREACHABLE(); |
| 1247 GenerateCallRuntime(instr->cid(), | |
| 1248 instr->token_index(), | |
| 1249 instr->try_index(), | |
| 1250 kReThrowRuntimeEntry); | |
| 1251 __ int3(); | |
| 1252 } | 1243 } |
| 1253 | 1244 |
| 1254 | 1245 |
| 1255 | 1246 |
| 1256 void FlowGraphCompiler::VisitBranch(BranchInstr* instr) { | 1247 void FlowGraphCompiler::VisitBranch(BranchInstr* instr) { |
| 1257 // Determine if the true branch is fall through (!negated) or the false | 1248 // Determine if the true branch is fall through (!negated) or the false |
| 1258 // branch is. They cannot both be backwards branches. | 1249 // branch is. They cannot both be backwards branches. |
| 1259 intptr_t index = reverse_index(current_block()->postorder_number()); | 1250 intptr_t index = reverse_index(current_block()->postorder_number()); |
| 1260 bool negated = (block_order_[index + 1] == instr->false_successor()); | 1251 bool negated = (block_order_[index + 1] == instr->false_successor()); |
| 1261 ASSERT(!negated == (block_order_[index + 1] == instr->true_successor())); | 1252 ASSERT(!negated == (block_order_[index + 1] == instr->true_successor())); |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 | 1713 |
| 1723 void FlowGraphCompiler::FinalizeComments(const Code& code) { | 1714 void FlowGraphCompiler::FinalizeComments(const Code& code) { |
| 1724 code.set_comments(assembler_->GetCodeComments()); | 1715 code.set_comments(assembler_->GetCodeComments()); |
| 1725 } | 1716 } |
| 1726 | 1717 |
| 1727 #undef __ | 1718 #undef __ |
| 1728 | 1719 |
| 1729 } // namespace dart | 1720 } // namespace dart |
| 1730 | 1721 |
| 1731 #endif // defined TARGET_ARCH_X64 | 1722 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |