Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 10453098: Move Throw and ReThrow to the location based code generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move Branch as well, introduce base class for instruction with inputs Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_compiler_x64.cc
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index ba2fc440c8c05102b6a981b28b2b22a7e8186945..fd1e9c9267d5b5145643b1cef3d137b15e023aba 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -1232,44 +1232,21 @@ void FlowGraphCompiler::VisitReturn(ReturnInstr* instr) {
void FlowGraphCompiler::VisitThrow(ThrowInstr* instr) {
- ASSERT(instr->exception()->IsUse());
- GenerateCallRuntime(instr->cid(),
- instr->token_index(),
- instr->try_index(),
- kThrowRuntimeEntry);
- __ int3();
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}
void FlowGraphCompiler::VisitReThrow(ReThrowInstr* instr) {
- ASSERT(instr->exception()->IsUse());
- ASSERT(instr->stack_trace()->IsUse());
- GenerateCallRuntime(instr->cid(),
- instr->token_index(),
- instr->try_index(),
- kReThrowRuntimeEntry);
- __ int3();
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}
void FlowGraphCompiler::VisitBranch(BranchInstr* instr) {
- // Determine if the true branch is fall through (!negated) or the false
- // branch is. They cannot both be backwards branches.
- intptr_t index = reverse_index(current_block()->postorder_number());
- bool negated = (block_order_[index + 1] == instr->false_successor());
- ASSERT(!negated == (block_order_[index + 1] == instr->true_successor()));
-
- LoadValue(RAX, instr->value());
- __ LoadObject(RDX, Bool::ZoneHandle(Bool::True()));
- __ cmpq(RAX, RDX);
- if (negated) {
- intptr_t target_index = instr->true_successor()->postorder_number();
- __ j(EQUAL, &block_info_[target_index]->label);
- } else {
- intptr_t target_index = instr->false_successor()->postorder_number();
- __ j(NOT_EQUAL, &block_info_[target_index]->label);
- }
+ // Moved to intermediate_language_x64.cc.
+ UNREACHABLE();
}

Powered by Google App Engine
This is Rietveld 408576698