Push version 3.0.3 to trunk.
Reapplied all changes for version 3.0.1.
Improved debugger protocol for remote debugging.
Added experimental support for using gyp to generate build files for V8.
Fixed implementation of String::Write in the API (issue 975).
git-svn-id: http://v8.googlecode.com/svn/trunk@6061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index 7e4a280..d254918 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -206,6 +206,11 @@
}
+void FullCodeGenerator::ClearAccumulator() {
+ __ mov(r0, Operand(Smi::FromInt(0)));
+}
+
+
void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) {
Comment cmnt(masm_, "[ Stack check");
Label ok;
@@ -890,7 +895,9 @@
__ bind(&update_each);
__ mov(result_register(), r3);
// Perform the assignment as if via '='.
- EmitAssignment(stmt->each());
+ { EffectContext context(this);
+ EmitAssignment(stmt->each(), stmt->AssignmentId());
+ }
// Generate code for the body of the loop.
Visit(stmt->body());
@@ -1444,7 +1451,7 @@
// For property compound assignments we need another deoptimization
// point after the property load.
if (property != NULL) {
- PrepareForBailoutForId(expr->compound_bailout_id(), TOS_REG);
+ PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
}
Token::Value op = expr->binary_op();
@@ -1487,6 +1494,8 @@
case VARIABLE:
EmitVariableAssignment(expr->target()->AsVariableProxy()->var(),
expr->op());
+ PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
+ context()->Plug(r0);
break;
case NAMED_PROPERTY:
EmitNamedPropertyAssignment(expr);
@@ -1536,7 +1545,7 @@
}
-void FullCodeGenerator::EmitAssignment(Expression* expr) {
+void FullCodeGenerator::EmitAssignment(Expression* expr, int bailout_ast_id) {
// Invalid left-hand sides are rewritten to have a 'throw
// ReferenceError' on the left-hand side.
if (!expr->IsValidLeftHandSide()) {
@@ -1584,6 +1593,8 @@
break;
}
}
+ PrepareForBailoutForId(bailout_ast_id, TOS_REG);
+ context()->Plug(r0);
}
@@ -1657,8 +1668,6 @@
}
__ bind(&done);
}
-
- context()->Plug(result_register());
}
@@ -1701,10 +1710,10 @@
__ push(ip);
__ CallRuntime(Runtime::kToFastProperties, 1);
__ pop(r0);
- context()->DropAndPlug(1, r0);
- } else {
- context()->Plug(r0);
+ __ Drop(1);
}
+ PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
+ context()->Plug(r0);
}
@@ -1745,10 +1754,10 @@
__ push(ip);
__ CallRuntime(Runtime::kToFastProperties, 1);
__ pop(r0);
- context()->DropAndPlug(1, r0);
- } else {
- context()->Plug(r0);
+ __ Drop(1);
}
+ PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
+ context()->Plug(r0);
}
@@ -3200,6 +3209,8 @@
{ EffectContext context(this);
EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
Token::ASSIGN);
+ PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
+ context.Plug(r0);
}
// For all contexts except EffectConstant We have the result on
// top of the stack.
@@ -3209,6 +3220,8 @@
} else {
EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(),
Token::ASSIGN);
+ PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
+ context()->Plug(r0);
}
break;
case NAMED_PROPERTY: {
@@ -3216,6 +3229,7 @@
__ pop(r1);
Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
EmitCallIC(ic, RelocInfo::CODE_TARGET);
+ PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) {
if (!context()->IsEffect()) {
context()->PlugTOS();
@@ -3230,6 +3244,7 @@
__ pop(r2); // Receiver.
Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
EmitCallIC(ic, RelocInfo::CODE_TARGET);
+ PrepareForBailoutForId(expr->AssignmentId(), TOS_REG);
if (expr->is_postfix()) {
if (!context()->IsEffect()) {
context()->PlugTOS();
@@ -3415,7 +3430,7 @@
case Token::INSTANCEOF: {
VisitForStackValue(expr->right());
- InstanceofStub stub;
+ InstanceofStub stub(InstanceofStub::kNoFlags);
__ CallStub(&stub);
PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false);
// The stub returns 0 for true.