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

Unified Diff: src/ic/mips64/ic-mips64.cc

Issue 1189153002: 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/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/ppc/handler-compiler-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/mips64/ic-mips64.cc
diff --git a/src/ic/mips64/ic-mips64.cc b/src/ic/mips64/ic-mips64.cc
index cbe9c0db786275fab12e4cdb950bb7f05bb75829..770fa77808dd5ef7631d3aeefd2d3e051f914d54 100644
--- a/src/ic/mips64/ic-mips64.cc
+++ b/src/ic/mips64/ic-mips64.cc
@@ -162,8 +162,7 @@
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
Register key, Register elements,
Register scratch1, Register scratch2,
- Register result, Label* slow,
- LanguageMode language_mode) {
+ Register result, Label* slow) {
// Register use:
//
// receiver - holds the receiver on entry.
@@ -185,7 +184,7 @@
//
// scratch2 - used to hold maps, prototypes, and the loaded value.
Label check_prototypes, check_next_prototype;
- Label done, in_bounds, absent;
+ Label done, in_bounds, return_undefined;
__ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
__ AssertFastElements(elements);
@@ -203,7 +202,7 @@
__ ld(scratch2, FieldMemOperand(scratch2, Map::kPrototypeOffset));
// scratch2: current prototype
__ LoadRoot(at, Heap::kNullValueRootIndex);
- __ Branch(&absent, eq, scratch2, Operand(at));
+ __ Branch(&return_undefined, eq, scratch2, Operand(at));
__ ld(elements, FieldMemOperand(scratch2, JSObject::kElementsOffset));
__ ld(scratch2, FieldMemOperand(scratch2, HeapObject::kMapOffset));
// elements: elements of current prototype
@@ -218,13 +217,9 @@
__ Branch(slow, ne, elements, Operand(at));
__ Branch(&check_next_prototype);
- __ bind(&absent);
- if (is_strong(language_mode)) {
- __ Branch(slow);
- } else {
- __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
- __ Branch(&done);
- }
+ __ bind(&return_undefined);
+ __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
+ __ Branch(&done);
__ bind(&in_bounds);
// Fast case: Do the load.
@@ -288,7 +283,7 @@
// Dictionary load failed, go slow (but don't miss).
__ bind(&slow);
- GenerateSlow(masm);
+ GenerateRuntimeGetProperty(masm);
}
@@ -323,7 +318,7 @@
}
-void LoadIC::GenerateSlow(MacroAssembler* masm) {
+void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
@@ -352,7 +347,7 @@
}
-void KeyedLoadIC::GenerateSlow(MacroAssembler* masm) {
+void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// The return address is in ra.
__ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
@@ -361,8 +356,7 @@
}
-void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
- LanguageMode language_mode) {
+void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is in ra.
Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary;
@@ -386,8 +380,7 @@
// Check the receiver's map to see if it has fast elements.
__ CheckFastElements(a0, a3, &check_number_dictionary);
- GenerateFastArrayLoad(masm, receiver, key, a0, a3, a4, v0, &slow,
- language_mode);
+ GenerateFastArrayLoad(masm, receiver, key, a0, a3, a4, v0, &slow);
__ IncrementCounter(isolate->counters()->keyed_load_generic_smi(), 1, a4, a3);
__ Ret();
@@ -408,7 +401,7 @@
__ bind(&slow);
__ IncrementCounter(isolate->counters()->keyed_load_generic_slow(), 1, a4,
a3);
- GenerateSlow(masm);
+ GenerateRuntimeGetProperty(masm);
__ bind(&check_name);
GenerateKeyNameCheck(masm, key, a0, a3, &index_name, &slow);
« no previous file with comments | « src/ic/mips64/handler-compiler-mips64.cc ('k') | src/ic/ppc/handler-compiler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698