Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: src/arm/full-codegen-arm.cc

Issue 1168093002: [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index f5b90b60bd18e3f18919af3f35bc7a94c4290ccf..2464157427a9501951f6b3fa86145091ef9244a2 100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -2242,7 +2242,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ ldr(load_name, MemOperand(sp, 2 * kPointerSize));
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(expr->KeyedLoadFeedbackSlot())));
- Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
+ Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), SLOPPY).code();
CallIC(ic, TypeFeedbackId::None());
__ mov(r1, r0);
__ str(r1, MemOperand(sp, 2 * kPointerSize));
@@ -2423,7 +2423,7 @@ void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) {
__ mov(LoadDescriptor::NameRegister(), Operand(key->value()));
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
- CallLoadIC(NOT_CONTEXTUAL);
+ CallLoadIC(NOT_CONTEXTUAL, language_mode());
}
@@ -2435,13 +2435,14 @@ void FullCodeGenerator::EmitNamedSuperPropertyLoad(Property* prop) {
DCHECK(prop->IsSuperAccess());
__ Push(key->value());
- __ CallRuntime(Runtime::kLoadFromSuper, 3);
+ __ Push(Smi::FromInt(language_mode()));
+ __ CallRuntime(Runtime::kLoadFromSuper, 4);
}
void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
SetSourcePosition(prop->position());
- Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
+ Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), language_mode()).code();
__ mov(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallIC(ic);
@@ -2450,9 +2451,10 @@ void FullCodeGenerator::EmitKeyedPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
// Stack: receiver, home_object, key.
+ __ Push(Smi::FromInt(language_mode()));
SetSourcePosition(prop->position());
- __ CallRuntime(Runtime::kLoadKeyedFromSuper, 3);
+ __ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
}
@@ -2998,6 +3000,7 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
__ ldr(scratch, MemOperand(sp, kPointerSize * 2));
__ Push(scratch);
__ Push(key->value());
+ __ Push(Smi::FromInt(language_mode()));
// Stack here:
// - home_object
@@ -3005,7 +3008,8 @@ void FullCodeGenerator::EmitSuperCallWithLoadIC(Call* expr) {
// - this (receiver) <-- LoadFromSuper will pop here and below.
// - home_object
// - key
- __ CallRuntime(Runtime::kLoadFromSuper, 3);
+ // - language_mode
+ __ CallRuntime(Runtime::kLoadFromSuper, 4);
// Replace home_object with target function.
__ str(r0, MemOperand(sp, kPointerSize));
@@ -3058,6 +3062,7 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
__ ldr(scratch, MemOperand(sp, kPointerSize * 2));
__ Push(scratch);
VisitForStackValue(prop->key());
+ __ Push(Smi::FromInt(language_mode()));
// Stack here:
// - home_object
@@ -3065,7 +3070,8 @@ void FullCodeGenerator::EmitKeyedSuperCallWithLoadIC(Call* expr) {
// - this (receiver) <-- LoadKeyedFromSuper will pop here and below.
// - home_object
// - key
- __ CallRuntime(Runtime::kLoadKeyedFromSuper, 3);
+ // - language_mode
+ __ CallRuntime(Runtime::kLoadKeyedFromSuper, 4);
// Replace home_object with target function.
__ str(r0, MemOperand(sp, kPointerSize));
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698