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

Unified Diff: src/x64/full-codegen-x64.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/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 7560117c7307465442b101a125598b10255221dc..abe53ff3c2ef25513cf1c5ac897141e8221eeebb 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -2196,7 +2196,7 @@
__ movp(load_receiver, Operand(rsp, kPointerSize));
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(expr->KeyedLoadFeedbackSlot()));
- Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code();
+ Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate(), SLOPPY).code();
CallIC(ic, TypeFeedbackId::None());
__ movp(rdi, rax);
__ movp(Operand(rsp, 2 * kPointerSize), rdi);
@@ -2364,7 +2364,7 @@
__ Move(LoadDescriptor::NameRegister(), key->value());
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
- CallLoadIC(NOT_CONTEXTUAL);
+ CallLoadIC(NOT_CONTEXTUAL, language_mode());
}
@@ -2376,13 +2376,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();
__ Move(LoadDescriptor::SlotRegister(),
SmiFromSlot(prop->PropertyFeedbackSlot()));
CallIC(ic);
@@ -2391,9 +2392,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);
}
@@ -2889,6 +2891,7 @@
__ Push(rax);
__ Push(Operand(rsp, kPointerSize * 2));
__ Push(key->value());
+ __ Push(Smi::FromInt(language_mode()));
// Stack here:
// - home_object
@@ -2896,7 +2899,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.
__ movp(Operand(rsp, kPointerSize), rax);
@@ -2946,6 +2950,7 @@
__ Push(rax);
__ Push(Operand(rsp, kPointerSize * 2));
VisitForStackValue(prop->key());
+ __ Push(Smi::FromInt(language_mode()));
// Stack here:
// - home_object
@@ -2953,7 +2958,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.
__ movp(Operand(rsp, kPointerSize), rax);
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698