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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 505133002: Unit test of instruction selection for calls with deoptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments. Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 for (int i = 0; i < descriptor->stack_count(); i++) { 1075 for (int i = 0; i < descriptor->stack_count(); i++) {
1076 inputs->push_back(UseOrImmediate(&g, stack->InputAt(i))); 1076 inputs->push_back(UseOrImmediate(&g, stack->InputAt(i)));
1077 } 1077 }
1078 } 1078 }
1079 1079
1080 1080
1081 void InstructionSelector::VisitDeoptimize(Node* deopt) { 1081 void InstructionSelector::VisitDeoptimize(Node* deopt) {
1082 DCHECK(deopt->op()->opcode() == IrOpcode::kDeoptimize); 1082 DCHECK(deopt->op()->opcode() == IrOpcode::kDeoptimize);
1083 Node* state = deopt->InputAt(0); 1083 Node* state = deopt->InputAt(0);
1084 FrameStateDescriptor* descriptor = GetFrameStateDescriptor(state); 1084 FrameStateDescriptor* descriptor = GetFrameStateDescriptor(state);
1085 int deoptimization_id = sequence()->AddDeoptimizationEntry(descriptor);
1085 1086
1086 InstructionOperandVector inputs(zone()); 1087 InstructionOperandVector inputs(zone());
1087 inputs.reserve(descriptor->size()); 1088 inputs.reserve(descriptor->size() + 1);
1089
1090 OperandGenerator g(this);
1091 inputs.push_back(g.TempImmediate(deoptimization_id));
1088 1092
1089 AddFrameStateInputs(state, &inputs, descriptor); 1093 AddFrameStateInputs(state, &inputs, descriptor);
1090 1094
1091 DCHECK_EQ(descriptor->size(), inputs.size()); 1095 DCHECK_EQ(descriptor->size() + 1, inputs.size());
1092 1096
1093 int deoptimization_id = sequence()->AddDeoptimizationEntry(descriptor); 1097 Emit(kArchDeoptimize, 0, NULL, inputs.size(), &inputs.front(), 0, NULL);
1094 Emit(kArchDeoptimize | MiscField::encode(deoptimization_id), 0, NULL,
1095 inputs.size(), &inputs.front(), 0, NULL);
1096 } 1098 }
1097 1099
1098 1100
1099 #if !V8_TURBOFAN_BACKEND 1101 #if !V8_TURBOFAN_BACKEND
1100 1102
1101 #define DECLARE_UNIMPLEMENTED_SELECTOR(x) \ 1103 #define DECLARE_UNIMPLEMENTED_SELECTOR(x) \
1102 void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); } 1104 void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); }
1103 MACHINE_OP_LIST(DECLARE_UNIMPLEMENTED_SELECTOR) 1105 MACHINE_OP_LIST(DECLARE_UNIMPLEMENTED_SELECTOR)
1104 #undef DECLARE_UNIMPLEMENTED_SELECTOR 1106 #undef DECLARE_UNIMPLEMENTED_SELECTOR
1105 1107
(...skipping 28 matching lines...) Expand all
1134 1136
1135 1137
1136 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, 1138 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
1137 BasicBlock* deoptimization) {} 1139 BasicBlock* deoptimization) {}
1138 1140
1139 #endif // !V8_TURBOFAN_BACKEND 1141 #endif // !V8_TURBOFAN_BACKEND
1140 1142
1141 } // namespace compiler 1143 } // namespace compiler
1142 } // namespace internal 1144 } // namespace internal
1143 } // namespace v8 1145 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698