| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 31066f0849c57793c6bd25a2c97dadc680644a29..772cfbaba7e33bcc40384af64e5019ad1999b2a4 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -1337,8 +1337,8 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(Variable* var,
|
|
|
| // All extension objects were empty and it is safe to use a global
|
| // load IC call.
|
| - __ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
| - __ mov(LoadIC::NameRegister(), var->name());
|
| + __ mov(edx, GlobalObjectOperand());
|
| + __ mov(ecx, var->name());
|
| ContextualMode mode = (typeof_state == INSIDE_TYPEOF)
|
| ? NOT_CONTEXTUAL
|
| : CONTEXTUAL;
|
| @@ -1418,8 +1418,10 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
|
| switch (var->location()) {
|
| case Variable::UNALLOCATED: {
|
| Comment cmnt(masm_, "[ Global variable");
|
| - __ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
| - __ mov(LoadIC::NameRegister(), var->name());
|
| + // Use inline caching. Variable name is passed in ecx and the global
|
| + // object in eax.
|
| + __ mov(edx, GlobalObjectOperand());
|
| + __ mov(ecx, var->name());
|
| CallLoadIC(CONTEXTUAL);
|
| context()->Plug(eax);
|
| break;
|
| @@ -2009,20 +2011,14 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
|
|
| // receiver = iter; f = iter.next; arg = received;
|
| __ bind(&l_next);
|
| - Register keyedload_receiver = KeyedLoadIC::ReceiverRegister();
|
| - Register keyedload_name = KeyedLoadIC::NameRegister();
|
| - ASSERT(keyedload_receiver.is(edx));
|
| - ASSERT(keyedload_name.is(ecx));
|
| -
|
| - __ mov(keyedload_name,
|
| - isolate()->factory()->next_string()); // "next"
|
| - __ push(keyedload_name);
|
| + __ mov(ecx, isolate()->factory()->next_string()); // "next"
|
| + __ push(ecx);
|
| __ push(Operand(esp, 2 * kPointerSize)); // iter
|
| __ push(eax); // received
|
|
|
| // result = receiver[f](arg);
|
| __ bind(&l_call);
|
| - __ mov(keyedload_receiver, Operand(esp, kPointerSize));
|
| + __ mov(edx, Operand(esp, kPointerSize));
|
| Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
|
| CallIC(ic, TypeFeedbackId::None());
|
| __ mov(edi, eax);
|
| @@ -2036,13 +2032,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| // if (!result.done) goto l_try;
|
| __ bind(&l_loop);
|
| __ push(eax); // save result
|
| - Register load_receiver = LoadIC::ReceiverRegister();
|
| - Register load_name = LoadIC::NameRegister();
|
| - ASSERT(load_receiver.is(edx));
|
| - ASSERT(load_name.is(ecx));
|
| - __ mov(load_receiver, eax); // result
|
| - __ mov(load_name,
|
| - isolate()->factory()->done_string()); // "done"
|
| + __ mov(edx, eax); // result
|
| + __ mov(ecx, isolate()->factory()->done_string()); // "done"
|
| CallLoadIC(NOT_CONTEXTUAL); // result.done in eax
|
| Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate());
|
| CallIC(bool_ic);
|
| @@ -2050,9 +2041,8 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ j(zero, &l_try);
|
|
|
| // result.value
|
| - __ pop(load_receiver); // result
|
| - __ mov(load_name,
|
| - isolate()->factory()->value_string()); // "value"
|
| + __ pop(edx); // result
|
| + __ mov(ecx, isolate()->factory()->value_string()); // "value"
|
| CallLoadIC(NOT_CONTEXTUAL); // result.value in eax
|
| context()->DropAndPlug(2, eax); // drop iter and g
|
| break;
|
| @@ -2212,7 +2202,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
|
| SetSourcePosition(prop->position());
|
| Literal* key = prop->key()->AsLiteral();
|
| ASSERT(!key->value()->IsSmi());
|
| - __ mov(LoadIC::NameRegister(), Immediate(key->value()));
|
| + __ mov(ecx, Immediate(key->value()));
|
| CallLoadIC(NOT_CONTEXTUAL, prop->PropertyFeedbackId());
|
| }
|
|
|
| @@ -2510,15 +2500,15 @@ void FullCodeGenerator::VisitProperty(Property* expr) {
|
|
|
| if (key->IsPropertyName()) {
|
| VisitForAccumulatorValue(expr->obj());
|
| - __ mov(LoadIC::ReceiverRegister(), result_register());
|
| + __ mov(edx, result_register());
|
| EmitNamedPropertyLoad(expr);
|
| PrepareForBailoutForId(expr->LoadId(), TOS_REG);
|
| context()->Plug(eax);
|
| } else {
|
| VisitForStackValue(expr->obj());
|
| VisitForAccumulatorValue(expr->key());
|
| - __ pop(KeyedLoadIC::ReceiverRegister()); // Object.
|
| - __ mov(KeyedLoadIC::NameRegister(), result_register()); // Key.
|
| + __ pop(edx); // Object.
|
| + __ mov(ecx, result_register()); // Key.
|
| EmitKeyedPropertyLoad(expr);
|
| context()->Plug(eax);
|
| }
|
| @@ -2551,7 +2541,7 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) {
|
| } else {
|
| // Load the function from the receiver.
|
| ASSERT(callee->IsProperty());
|
| - __ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
|
| + __ mov(edx, Operand(esp, 0));
|
| EmitNamedPropertyLoad(callee->AsProperty());
|
| PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
| // Push the target function under the receiver.
|
| @@ -2573,9 +2563,9 @@ void FullCodeGenerator::EmitKeyedCallWithLoadIC(Call* expr,
|
|
|
| // Load the function from the receiver.
|
| ASSERT(callee->IsProperty());
|
| - __ mov(KeyedLoadIC::ReceiverRegister(), Operand(esp, 0));
|
| + __ mov(edx, Operand(esp, 0));
|
| // Move the key into the right register for the keyed load IC.
|
| - __ mov(KeyedLoadIC::NameRegister(), eax);
|
| + __ mov(ecx, eax);
|
| EmitKeyedPropertyLoad(callee->AsProperty());
|
| PrepareForBailoutForId(callee->AsProperty()->LoadId(), TOS_REG);
|
|
|
| @@ -4033,8 +4023,8 @@ void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
|
|
|
| // Load the function from the receiver.
|
| - __ mov(LoadIC::ReceiverRegister(), Operand(esp, 0));
|
| - __ mov(LoadIC::NameRegister(), Immediate(expr->name()));
|
| + __ mov(edx, Operand(esp, 0));
|
| + __ mov(ecx, Immediate(expr->name()));
|
| CallLoadIC(NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId());
|
|
|
| // Push the target function under the receiver.
|
| @@ -4217,16 +4207,14 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
|
| if (assign_type == NAMED_PROPERTY) {
|
| // Put the object both on the stack and in edx.
|
| VisitForAccumulatorValue(prop->obj());
|
| - ASSERT(!eax.is(LoadIC::ReceiverRegister()));
|
| __ push(eax);
|
| - __ mov(LoadIC::ReceiverRegister(), eax);
|
| + __ mov(edx, eax);
|
| EmitNamedPropertyLoad(prop);
|
| } else {
|
| VisitForStackValue(prop->obj());
|
| VisitForStackValue(prop->key());
|
| - __ mov(KeyedLoadIC::ReceiverRegister(),
|
| - Operand(esp, kPointerSize)); // Object.
|
| - __ mov(KeyedLoadIC::NameRegister(), Operand(esp, 0)); // Key.
|
| + __ mov(edx, Operand(esp, kPointerSize)); // Object.
|
| + __ mov(ecx, Operand(esp, 0)); // Key.
|
| EmitKeyedPropertyLoad(prop);
|
| }
|
| }
|
| @@ -4383,8 +4371,8 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
|
|
|
| if (proxy != NULL && proxy->var()->IsUnallocated()) {
|
| Comment cmnt(masm_, "[ Global variable");
|
| - __ mov(LoadIC::ReceiverRegister(), GlobalObjectOperand());
|
| - __ mov(LoadIC::NameRegister(), Immediate(proxy->name()));
|
| + __ mov(edx, GlobalObjectOperand());
|
| + __ mov(ecx, Immediate(proxy->name()));
|
| // Use a regular load, not a contextual load, to avoid a reference
|
| // error.
|
| CallLoadIC(NOT_CONTEXTUAL);
|
|
|