| Index: src/x64/full-codegen-x64.cc
|
| ===================================================================
|
| --- src/x64/full-codegen-x64.cc (revision 8778)
|
| +++ src/x64/full-codegen-x64.cc (working copy)
|
| @@ -746,7 +746,7 @@
|
| // IDs for bailouts from optimized code.
|
| ASSERT(prop->obj()->AsVariableProxy() != NULL);
|
| { AccumulatorValueContext for_object(this);
|
| - EmitVariableLoad(prop->obj()->AsVariableProxy()->var());
|
| + EmitVariableLoad(prop->obj()->AsVariableProxy());
|
| }
|
| __ push(rax);
|
| VisitForAccumulatorValue(function);
|
| @@ -1076,7 +1076,7 @@
|
|
|
| void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) {
|
| Comment cmnt(masm_, "[ VariableProxy");
|
| - EmitVariableLoad(expr->var());
|
| + EmitVariableLoad(expr);
|
| }
|
|
|
|
|
| @@ -1227,7 +1227,11 @@
|
| }
|
|
|
|
|
| -void FullCodeGenerator::EmitVariableLoad(Variable* var) {
|
| +void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
| + // Record position before possible IC call.
|
| + SetSourcePosition(proxy->position());
|
| + Variable* var = proxy->var();
|
| +
|
| // Three cases: non-this global variables, lookup slots, and all other
|
| // types of slots.
|
| Slot* slot = var->AsSlot();
|
| @@ -1553,7 +1557,7 @@
|
| { AccumulatorValueContext context(this);
|
| switch (assign_type) {
|
| case VARIABLE:
|
| - EmitVariableLoad(expr->target()->AsVariableProxy()->var());
|
| + EmitVariableLoad(expr->target()->AsVariableProxy());
|
| PrepareForBailout(expr->target(), TOS_REG);
|
| break;
|
| case NAMED_PROPERTY:
|
| @@ -2670,13 +2674,11 @@
|
| // with '%2s' (see Logger::LogRuntime for all the formats).
|
| // 2 (array): Arguments to the format string.
|
| ASSERT_EQ(args->length(), 3);
|
| -#ifdef ENABLE_LOGGING_AND_PROFILING
|
| if (CodeGenerator::ShouldGenerateLog(args->at(0))) {
|
| VisitForStackValue(args->at(1));
|
| VisitForStackValue(args->at(2));
|
| __ CallRuntime(Runtime::kLog, 2);
|
| }
|
| -#endif
|
| // Finally, we're expected to leave a value on the top of the stack.
|
| __ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
|
| context()->Plug(rax);
|
| @@ -3765,7 +3767,7 @@
|
| if (assign_type == VARIABLE) {
|
| ASSERT(expr->expression()->AsVariableProxy()->var() != NULL);
|
| AccumulatorValueContext context(this);
|
| - EmitVariableLoad(expr->expression()->AsVariableProxy()->var());
|
| + EmitVariableLoad(expr->expression()->AsVariableProxy());
|
| } else {
|
| // Reserve space for result of postfix operation.
|
| if (expr->is_postfix() && !context()->IsEffect()) {
|
| @@ -4077,10 +4079,8 @@
|
| default: {
|
| VisitForAccumulatorValue(expr->right());
|
| Condition cc = no_condition;
|
| - bool strict = false;
|
| switch (op) {
|
| case Token::EQ_STRICT:
|
| - strict = true;
|
| // Fall through.
|
| case Token::EQ:
|
| cc = equal;
|
|
|