Reviewers: fschneider,
Description:
MIPS: Support declarations of context allocated locals in Crankshaft.
Ported r9112 (acb31f2)
Original commit message:
The changes to scopes and parser introduce a VariableProxy
wrapping the function-name variable for function literals.
It seems the easiest way to get an AST id for the HSimulate
after context-slot stores in declarations.
BUG=
TEST=
Please review this at http://codereview.chromium.org/7739017/
Affected files:
M src/mips/full-codegen-mips.cc
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
48c176acdba7961a4648bf19c3c64fc9acd0041c..ec2a248060b143e04ad3b882abe0de5e025c4bce
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -691,10 +691,11 @@ void FullCodeGenerator::Move(Slot* dst,
}
-void FullCodeGenerator::EmitDeclaration(Variable* variable,
+void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy,
Variable::Mode mode,
FunctionLiteral* function) {
Comment cmnt(masm_, "[ Declaration");
+ Variable* variable = proxy->var();
ASSERT(variable != NULL); // Must have been resolved.
Slot* slot = variable->AsSlot();
ASSERT(slot != NULL);
@@ -734,10 +735,12 @@ void FullCodeGenerator::EmitDeclaration(Variable*
variable,
// We know that we have written a function, which is not a smi.
__ mov(a1, cp);
__ RecordWrite(a1, Operand(offset), a2, result_register());
+ PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
} else if (mode == Variable::CONST || mode == Variable::LET) {
__ LoadRoot(at, Heap::kTheHoleValueRootIndex);
__ sw(at, ContextOperand(cp, slot->index()));
// No write barrier since the_hole_value is in old space.
+ PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
}
break;
@@ -774,7 +777,7 @@ void FullCodeGenerator::EmitDeclaration(Variable*
variable,
void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
- EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun());
+ EmitDeclaration(decl->proxy(), decl->mode(), decl->fun());
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev