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

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

Issue 1199493002: Revert relanded strong property access CL (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/ia32/handler-compiler-ia32.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ia32/ic-ia32.cc
diff --git a/src/ic/ia32/ic-ia32.cc b/src/ic/ia32/ic-ia32.cc
index 4f8ee0889eb2b1dbd44005cfe8e0284b01b1344b..6d54b074d22fcad6ca2a3a066dc893eb42300387 100644
--- a/src/ic/ia32/ic-ia32.cc
+++ b/src/ic/ia32/ic-ia32.cc
@@ -172,7 +172,7 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm,
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
Register key, Register scratch,
Register scratch2, Register result,
- Label* slow, LanguageMode language_mode) {
+ Label* slow) {
// Register use:
// receiver - holds the receiver and is unchanged.
// key - holds the key and is unchanged (must be a smi).
@@ -182,7 +182,7 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
// result - holds the result on exit if the load succeeds and
// we fall through.
Label check_prototypes, check_next_prototype;
- Label done, in_bounds, absent;
+ Label done, in_bounds, return_undefined;
__ mov(scratch, FieldOperand(receiver, JSObject::kElementsOffset));
__ AssertFastElements(scratch);
@@ -200,7 +200,7 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
__ mov(scratch2, FieldOperand(scratch2, Map::kPrototypeOffset));
// scratch2: current prototype
__ cmp(scratch2, masm->isolate()->factory()->null_value());
- __ j(equal, &absent);
+ __ j(equal, &return_undefined);
__ mov(scratch, FieldOperand(scratch2, JSObject::kElementsOffset));
__ mov(scratch2, FieldOperand(scratch2, HeapObject::kMapOffset));
// scratch: elements of current prototype
@@ -215,14 +215,9 @@ static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
__ j(not_equal, slow);
__ jmp(&check_next_prototype);
- __ bind(&absent);
- if (is_strong(language_mode)) {
- // Strong mode accesses must throw in this case, so call the runtime.
- __ jmp(slow);
- } else {
- __ mov(result, masm->isolate()->factory()->undefined_value());
- __ jmp(&done);
- }
+ __ bind(&return_undefined);
+ __ mov(result, masm->isolate()->factory()->undefined_value());
+ __ jmp(&done);
__ bind(&in_bounds);
// Fast case: Do the load.
@@ -268,8 +263,7 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
}
-void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
- LanguageMode language_mode) {
+void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) {
// The return address is on the stack.
Label slow, check_name, index_smi, index_name, property_array_property;
Label probe_dictionary, check_number_dictionary;
@@ -291,8 +285,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
// Check the receiver's map to see if it has fast elements.
__ CheckFastElements(eax, &check_number_dictionary);
- GenerateFastArrayLoad(masm, receiver, key, eax, ebx, eax, &slow,
- language_mode);
+ GenerateFastArrayLoad(masm, receiver, key, eax, ebx, eax, &slow);
Isolate* isolate = masm->isolate();
Counters* counters = isolate->counters();
__ IncrementCounter(counters->keyed_load_generic_smi(), 1);
@@ -324,7 +317,7 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm,
__ bind(&slow);
// Slow case: jump to runtime.
__ IncrementCounter(counters->keyed_load_generic_slow(), 1);
- GenerateSlow(masm);
+ GenerateRuntimeGetProperty(masm);
__ bind(&check_name);
GenerateKeyNameCheck(masm, key, eax, ebx, &index_name, &slow);
@@ -630,7 +623,7 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) {
// Dictionary load failed, go slow (but don't miss).
__ bind(&slow);
- GenerateSlow(masm);
+ GenerateRuntimeGetProperty(masm);
}
@@ -665,7 +658,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
}
-void LoadIC::GenerateSlow(MacroAssembler* masm) {
+void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// Return address is on the stack.
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
@@ -677,10 +670,7 @@ void LoadIC::GenerateSlow(MacroAssembler* masm) {
__ push(ebx);
// Perform tail call to the entry.
- ExternalReference ref =
- ExternalReference(IC_Utility(kLoadIC_Slow), masm->isolate());
- int arg_count = 2;
- __ TailCallExternalReference(ref, arg_count, 1);
+ __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
}
@@ -698,7 +688,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
}
-void KeyedLoadIC::GenerateSlow(MacroAssembler* masm) {
+void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
// Return address is on the stack.
Register receiver = LoadDescriptor::ReceiverRegister();
Register name = LoadDescriptor::NameRegister();
@@ -710,10 +700,7 @@ void KeyedLoadIC::GenerateSlow(MacroAssembler* masm) {
__ push(ebx);
// Perform tail call to the entry.
- ExternalReference ref =
- ExternalReference(IC_Utility(kKeyedLoadIC_Slow), masm->isolate());
- int arg_count = 2;
- __ TailCallExternalReference(ref, arg_count, 1);
+ __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
}
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698