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

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

Issue 1185343005: Revert of Revert of [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index a44e02dee47565c1ca95cd54f24bd07d6668fc41..79d38b807410ac3c6b4bc17e18bed965e2367bb7 100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -2229,7 +2229,7 @@
__ lw(load_name, MemOperand(sp, 2 * kPointerSize));
__ li(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(a0, v0);
__ mov(a1, a0);
@@ -2400,7 +2400,7 @@
__ li(LoadDescriptor::NameRegister(), Operand(key->value()));
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
- CallLoadIC(NOT_CONTEXTUAL);
+ CallLoadIC(NOT_CONTEXTUAL, language_mode());
}
@@ -2412,13 +2412,14 @@
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();
__ li(LoadDescriptor::SlotRegister(),
Operand(SmiFromSlot(prop->PropertyFeedbackSlot())));
CallIC(ic);
@@ -2427,9 +2428,10 @@
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);
}
@@ -2975,6 +2977,7 @@
VisitForAccumulatorValue(super_ref->this_var());
__ Push(scratch, v0, v0, scratch);
__ Push(key->value());
+ __ Push(Smi::FromInt(language_mode()));
// Stack here:
// - home_object
@@ -2982,7 +2985,8 @@
// - 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.
__ sw(v0, MemOperand(sp, kPointerSize));
@@ -3033,6 +3037,7 @@
VisitForAccumulatorValue(super_ref->this_var());
__ Push(scratch, v0, v0, scratch);
VisitForStackValue(prop->key());
+ __ Push(Smi::FromInt(language_mode()));
// Stack here:
// - home_object
@@ -3040,7 +3045,8 @@
// - 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.
__ sw(v0, MemOperand(sp, kPointerSize));
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698