Index: src/ppc/full-codegen-ppc.cc |
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc |
index 1231c15a82228e63f310b60063ac1abd66dcfdbc..e7b945bc1d27aa1d2aeda912bdb076040a3b5767 100644 |
--- a/src/ppc/full-codegen-ppc.cc |
+++ b/src/ppc/full-codegen-ppc.cc |
@@ -1340,7 +1340,7 @@ void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, |
void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
- TypeofState typeof_state, |
+ TypeofMode typeof_mode, |
Label* slow) { |
Register current = cp; |
Register next = r4; |
@@ -1389,7 +1389,7 @@ void FullCodeGenerator::EmitLoadGlobalCheckExtensions(VariableProxy* proxy, |
// All extension objects were empty and it is safe to use a normal global |
// load machinery. |
- EmitGlobalVariableLoad(proxy, typeof_state); |
+ EmitGlobalVariableLoad(proxy, typeof_mode); |
} |
@@ -1426,7 +1426,7 @@ MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, |
void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
- TypeofState typeof_state, |
+ TypeofMode typeof_mode, |
Label* slow, Label* done) { |
// Generate fast-case code for variables that might be shadowed by |
// eval-introduced variables. Eval is used a lot without |
@@ -1435,7 +1435,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
// containing the eval. |
Variable* var = proxy->var(); |
if (var->mode() == DYNAMIC_GLOBAL) { |
- EmitLoadGlobalCheckExtensions(proxy, typeof_state, slow); |
+ EmitLoadGlobalCheckExtensions(proxy, typeof_mode, slow); |
__ b(done); |
} else if (var->mode() == DYNAMIC_LOCAL) { |
Variable* local = var->local_if_not_shadowed(); |
@@ -1458,7 +1458,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(VariableProxy* proxy, |
void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
- TypeofState typeof_state) { |
+ TypeofMode typeof_mode) { |
Variable* var = proxy->var(); |
DCHECK(var->IsUnallocatedOrGlobalSlot() || |
(var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL)); |
@@ -1482,15 +1482,13 @@ void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
__ mov(LoadDescriptor::NameRegister(), Operand(var->name())); |
__ mov(LoadDescriptor::SlotRegister(), |
Operand(SmiFromSlot(proxy->VariableFeedbackSlot()))); |
- // Inside typeof use a regular load, not a contextual load, to avoid |
- // a reference error. |
- CallLoadIC(typeof_state == NOT_INSIDE_TYPEOF ? CONTEXTUAL : NOT_CONTEXTUAL); |
+ CallLoadIC(typeof_mode); |
} |
} |
void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
- TypeofState typeof_state) { |
+ TypeofMode typeof_mode) { |
// Record position before possible IC call. |
SetExpressionPosition(proxy); |
PrepareForBailoutForId(proxy->BeforeId(), NO_REGISTERS); |
@@ -1502,7 +1500,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
case VariableLocation::GLOBAL: |
case VariableLocation::UNALLOCATED: { |
Comment cmnt(masm_, "[ Global variable"); |
- EmitGlobalVariableLoad(proxy, typeof_state); |
+ EmitGlobalVariableLoad(proxy, typeof_mode); |
context()->Plug(r3); |
break; |
} |
@@ -1510,7 +1508,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
case VariableLocation::PARAMETER: |
case VariableLocation::LOCAL: |
case VariableLocation::CONTEXT: { |
- DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_state); |
+ DCHECK_EQ(NOT_INSIDE_TYPEOF, typeof_mode); |
Comment cmnt(masm_, var->IsContextSlot() ? "[ Context variable" |
: "[ Stack variable"); |
if (var->binding_needs_init()) { |
@@ -1584,12 +1582,12 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, |
Label done, slow; |
// Generate code for loading from variables potentially shadowed |
// by eval-introduced variables. |
- EmitDynamicLookupFastCase(proxy, typeof_state, &slow, &done); |
+ EmitDynamicLookupFastCase(proxy, typeof_mode, &slow, &done); |
__ bind(&slow); |
__ mov(r4, Operand(var->name())); |
__ Push(cp, r4); // Context and name. |
Runtime::FunctionId function_id = |
- typeof_state == NOT_INSIDE_TYPEOF |
+ typeof_mode == NOT_INSIDE_TYPEOF |
? Runtime::kLoadLookupSlot |
: Runtime::kLoadLookupSlotNoReferenceError; |
__ CallRuntime(function_id, 2); |
@@ -2267,7 +2265,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ LoadRoot(load_name, Heap::kdone_stringRootIndex); // "done" |
__ mov(LoadDescriptor::SlotRegister(), |
Operand(SmiFromSlot(expr->DoneFeedbackSlot()))); |
- CallLoadIC(NOT_CONTEXTUAL); // r0=result.done |
+ CallLoadIC(NOT_INSIDE_TYPEOF); // r0=result.done |
Handle<Code> bool_ic = ToBooleanStub::GetUninitialized(isolate()); |
CallIC(bool_ic); |
__ cmpi(r3, Operand::Zero()); |
@@ -2278,7 +2276,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ LoadRoot(load_name, Heap::kvalue_stringRootIndex); // "value" |
__ mov(LoadDescriptor::SlotRegister(), |
Operand(SmiFromSlot(expr->ValueFeedbackSlot()))); |
- CallLoadIC(NOT_CONTEXTUAL); // r3=result.value |
+ CallLoadIC(NOT_INSIDE_TYPEOF); // r3=result.value |
context()->DropAndPlug(2, r3); // drop iter and g |
break; |
} |
@@ -2439,7 +2437,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
__ mov(LoadDescriptor::NameRegister(), Operand(key->value())); |
__ mov(LoadDescriptor::SlotRegister(), |
Operand(SmiFromSlot(prop->PropertyFeedbackSlot()))); |
- CallLoadIC(NOT_CONTEXTUAL, language_mode()); |
+ CallLoadIC(NOT_INSIDE_TYPEOF, language_mode()); |
} |
@@ -4787,7 +4785,7 @@ void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { |
__ mov(LoadDescriptor::NameRegister(), Operand(expr->name())); |
__ mov(LoadDescriptor::SlotRegister(), |
Operand(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); |
- CallLoadIC(NOT_CONTEXTUAL); |
+ CallLoadIC(NOT_INSIDE_TYPEOF); |
} |