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

Unified Diff: src/compiler/code-generator.cc

Issue 528963002: Revert "Make FrameStates recursive (to be used for inlining)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 8f034fcf17c89a5dd905f3dae7d321945358b9c5..f85168e155669025594260f9f68501af87b5d618 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -301,16 +301,11 @@ FrameStateDescriptor* CodeGenerator::GetFrameStateDescriptor(
}
-void CodeGenerator::BuildTranslationForFrameStateDescriptor(
- FrameStateDescriptor* descriptor, Instruction* instr,
- Translation* translation, int frame_state_offset,
- OutputFrameStateCombine state_combine) {
- // Outer-most state must be added to translation first.
- if (descriptor->outer_state() != NULL) {
- BuildTranslationForFrameStateDescriptor(
- descriptor->outer_state(), instr, translation,
- frame_state_offset + descriptor->size(), kIgnoreOutput);
- }
+int CodeGenerator::BuildTranslation(Instruction* instr, int frame_state_offset,
+ OutputFrameStateCombine state_combine) {
+ FrameStateDescriptor* descriptor =
+ GetFrameStateDescriptor(instr, frame_state_offset);
+ frame_state_offset++;
int height = descriptor->size() - descriptor->parameters_count();
switch (state_combine) {
@@ -321,35 +316,24 @@ void CodeGenerator::BuildTranslationForFrameStateDescriptor(
break;
}
- translation->BeginJSFrame(descriptor->bailout_id(),
- Translation::kSelfLiteralId, height);
+
+ Translation translation(&translations_, 1, 1, zone());
+ translation.BeginJSFrame(descriptor->bailout_id(),
+ Translation::kSelfLiteralId, height);
for (int i = 0; i < descriptor->size(); i++) {
- AddTranslationForOperand(translation, instr,
+ AddTranslationForOperand(&translation, instr,
instr->InputAt(i + frame_state_offset));
}
switch (state_combine) {
case kPushOutput:
DCHECK(instr->OutputCount() == 1);
- AddTranslationForOperand(translation, instr, instr->OutputAt(0));
+ AddTranslationForOperand(&translation, instr, instr->OutputAt(0));
break;
case kIgnoreOutput:
break;
}
-}
-
-
-int CodeGenerator::BuildTranslation(Instruction* instr, int frame_state_offset,
- OutputFrameStateCombine state_combine) {
- FrameStateDescriptor* descriptor =
- GetFrameStateDescriptor(instr, frame_state_offset);
- frame_state_offset++;
-
- int frame_count = descriptor->GetFrameCount();
- Translation translation(&translations_, frame_count, frame_count, zone());
- BuildTranslationForFrameStateDescriptor(descriptor, instr, &translation,
- frame_state_offset, state_combine);
int deoptimization_id = static_cast<int>(deoptimization_states_.size());
« no previous file with comments | « src/compiler/code-generator.h ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698