Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index 3841838595a44e6f3f159f71a3503d57b82a7502..8c7fb5d0abb8649c788987ac36d7cc47cb18e6fe 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -124,7 +124,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() * kXRegSize; |
__ Peek(x10, receiver_offset); |
@@ -263,7 +263,7 @@ void FullCodeGenerator::Generate() { |
// The stub will rewrite receiver 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; |
@@ -1288,7 +1288,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(x2, Operand(info)); |
__ CallStub(&stub); |
} else { |
@@ -1721,7 +1721,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
VisitForStackValue(key); |
VisitForStackValue(value); |
EmitSetHomeObjectIfNeeded(value, 2); |
- __ Mov(x0, Smi::FromInt(SLOPPY)); // Strict mode |
+ __ Mov(x0, Smi::FromInt(SLOPPY)); // Language mode |
__ Push(x0); |
__ CallRuntime(Runtime::kSetProperty, 4); |
} else { |
@@ -2349,7 +2349,7 @@ void FullCodeGenerator::EmitAssignment(Expression* expr) { |
__ Pop(StoreDescriptor::ReceiverRegister(), |
StoreDescriptor::ValueRegister()); |
Handle<Code> ic = |
- CodeFactory::KeyedStoreIC(isolate(), strict_mode()).code(); |
+ CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); |
CallIC(ic); |
break; |
} |
@@ -2416,7 +2416,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, |
if (var->IsLookupSlot()) { |
// Assignment to var. |
__ Mov(x11, Operand(var->name())); |
- __ Mov(x10, Smi::FromInt(strict_mode())); |
+ __ Mov(x10, Smi::FromInt(language_mode())); |
// jssp[0] : mode. |
// jssp[8] : name. |
// jssp[16] : context. |
@@ -2435,7 +2435,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, |
} |
EmitStoreToStackLocalOrContextSlot(var, location); |
} |
- } else if (IsSignallingAssignmentToConst(var, op, strict_mode())) { |
+ } else if (IsSignallingAssignmentToConst(var, op, language_mode())) { |
__ CallRuntime(Runtime::kThrowConstAssignError, 0); |
} |
} |
@@ -2470,8 +2470,8 @@ void FullCodeGenerator::EmitNamedSuperPropertyStore(Property* prop) { |
__ Push(key->value()); |
__ Push(x0); |
- __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreToSuper_Strict |
- : Runtime::kStoreToSuper_Sloppy), |
+ __ CallRuntime((is_strict(language_mode()) ? Runtime::kStoreToSuper_Strict |
+ : Runtime::kStoreToSuper_Sloppy), |
4); |
} |
@@ -2483,9 +2483,10 @@ void FullCodeGenerator::EmitKeyedSuperPropertyStore(Property* prop) { |
DCHECK(prop != NULL); |
__ Push(x0); |
- __ CallRuntime((strict_mode() == STRICT ? Runtime::kStoreKeyedToSuper_Strict |
- : Runtime::kStoreKeyedToSuper_Sloppy), |
- 4); |
+ __ CallRuntime( |
+ (is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
+ : Runtime::kStoreKeyedToSuper_Sloppy), |
+ 4); |
} |
@@ -2499,7 +2500,8 @@ void FullCodeGenerator::EmitKeyedPropertyAssignment(Assignment* expr) { |
__ Pop(StoreDescriptor::NameRegister(), StoreDescriptor::ReceiverRegister()); |
DCHECK(StoreDescriptor::ValueRegister().is(x0)); |
- 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); |
@@ -2724,7 +2726,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { |
__ Ldr(x11, MemOperand(fp, receiver_offset * kPointerSize)); |
// Prepare to push the language mode. |
- __ Mov(x12, Smi::FromInt(strict_mode())); |
+ __ Mov(x12, Smi::FromInt(language_mode())); |
// Prepare to push the start position of the scope the calls resides in. |
__ Mov(x13, Smi::FromInt(scope()->start_position())); |
@@ -4258,7 +4260,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
if (property != NULL) { |
VisitForStackValue(property->obj()); |
VisitForStackValue(property->key()); |
- __ Mov(x10, Smi::FromInt(strict_mode())); |
+ __ Mov(x10, Smi::FromInt(language_mode())); |
__ Push(x10); |
__ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); |
context()->Plug(x0); |
@@ -4266,7 +4268,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(x12, GlobalObjectMemOperand()); |
__ Mov(x11, Operand(var->name())); |
@@ -4585,7 +4587,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ Pop(StoreDescriptor::NameRegister()); |
__ Pop(StoreDescriptor::ReceiverRegister()); |
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()) { |