Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index effbac6dfb3e9333da12ab49469235d7312b3148..f82d506f9ee9538dfebb0605c14771b937c80d12 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -126,7 +126,7 @@ void FullCodeGenerator::Generate() { |
// Sloppy mode functions and builtins need to replace the receiver with the |
// global proxy when called as functions (without an explicit receiver |
// object). |
- if (info->strict_mode() == SLOPPY && !info->is_native()) { |
+ if (is_sloppy(info->language_mode()) && !info->is_native()) { |
Label ok; |
int receiver_offset = info->scope()->num_parameters() * kPointerSize; |
__ ldr(r2, MemOperand(sp, receiver_offset)); |
@@ -263,7 +263,7 @@ void FullCodeGenerator::Generate() { |
// The stub will rewrite receiever and parameter count if the previous |
// stack frame was an arguments adapter frame. |
ArgumentsAccessStub::Type type; |
- if (strict_mode() == STRICT) { |
+ if (is_strict(language_mode())) { |
type = ArgumentsAccessStub::NEW_STRICT; |
} else if (function()->has_duplicate_parameters()) { |
type = ArgumentsAccessStub::NEW_SLOPPY_SLOW; |
@@ -1300,7 +1300,7 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, |
!pretenure && |
scope()->is_function_scope() && |
info->num_literals() == 0) { |
- FastNewClosureStub stub(isolate(), info->strict_mode(), info->kind()); |
+ FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
__ mov(r2, Operand(info)); |
__ CallStub(&stub); |
} else { |
@@ -2662,7 +2662,7 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
__ Pop(StoreDescriptor::ValueRegister(), |
StoreDescriptor::ReceiverRegister()); |
Handle<Code> ic = |
- CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
+ CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
CallIC(ic); |
break; |
} |
@@ -2731,8 +2731,8 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { |
// Assignment to var. |
__ push(r0); // Value. |
__ mov(r1, Operand(var->name())); |
- __ mov(r0, Operand(Smi::FromInt(strict_mode()))); |
- __ Push(cp, r1, r0); // Context, name, strict mode. |
+ __ mov(r0, Operand(Smi::FromInt(language_mode()))); |
+ __ Push(cp, r1, r0); // Context, name, language mode. |
__ CallRuntime(Runtime::kStoreLookupSlot, 4); |
} else { |
// Assignment to var or initializing assignment to let/const in harmony |
@@ -2747,7 +2747,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op) { |
} |
EmitStoreToStackLocalOrContextSlot(var, location); |
} |
- } else if (IsSignallingAssignmentToConst(var, op, strict_mode())) { |
+ } else if (IsSignallingAssignmentToConst(var, op, language_mode())) { |
__ CallRuntime(Runtime::kThrowConstAssignError, 0); |
} |
} |
@@ -2781,8 +2781,8 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
__ Push(key->value()); |
__ Push(r0); |
- __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict |
- : Runtime::kStoreToSuper_Sloppy), |
+ __ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict |
+ : Runtime::kStoreToSuper_Sloppy), |
4); |
} |
@@ -2794,9 +2794,10 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
DCHECK(prop != NULL); |
__ Push(r0); |
- __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreKeyedToSuper_Strict |
- : Runtime::kStoreKeyedToSuper_Sloppy), |
- 4); |
+ __ CallRuntime( |
+ (is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
+ : Runtime::kStoreKeyedToSuper_Sloppy), |
+ 4); |
} |
@@ -2808,7 +2809,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
__ Pop(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister()); |
DCHECK(StoreDescriptor::ValueRegister().is(r0)); |
- Handle<Code> ic = CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
+ Handle<Code> ic = |
+ CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
CallIC(ic, expr->AssignmentFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
@@ -3035,8 +3037,8 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
int receiver_offset = 2 + info_->scope()->num_parameters(); |
__ ldr(r3, MemOperand(fp, receiver_offset * kPointerSize)); |
- // r2: strict mode. |
- __ mov(r2, Operand(Smi::FromInt(strict_mode()))); |
+ // r2: language mode. |
+ __ mov(r2, Operand(Smi::FromInt(language_mode()))); |
// r1: the start position of the scope the calls resides in. |
__ mov(r1, Operand(Smi::FromInt(scope()->start_position()))); |
@@ -4571,7 +4573,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
if (property != NULL) { |
VisitForStackValue(property->obj()); |
VisitForStackValue(property->key()); |
- __ mov(r1, Operand(Smi::FromInt(strict_mode()))); |
+ __ mov(r1, Operand(Smi::FromInt(language_mode()))); |
__ push(r1); |
__ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
context()->Plug(r0); |
@@ -4579,7 +4581,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
Variable* var = proxy->var(); |
// Delete of an unqualified identifier is disallowed in strict mode |
// but "delete this" is allowed. |
- DCHECK(strict_mode() == SLOPPY || var->is_this()); |
+ DCHECK(is_sloppy(language_mode()) || var->is_this()); |
if (var->IsUnallocated()) { |
__ ldr(r2, GlobalObjectOperand()); |
__ mov(r1, Operand(var->name())); |
@@ -4900,7 +4902,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ Pop(StoreDescriptor::ReceiverRegister(), |
StoreDescriptor::NameRegister()); |
Handle<Code> ic = |
- CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
+ CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
CallIC(ic, expr->CountStoreFeedbackId()); |
PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
if (expr->is_postfix()) { |