Revision: 24063
Author: [email protected]
Date: Fri Sep 19 06:33:37 2014 UTC
Log: X87: Convert KeyedLoad indexed interceptor case to a Handler.
port r24042.
original commit message:
Convert KeyedLoad indexed interceptor case to a Handler.
Currently, KeyedLoads on objects with indexed interceptors are handled
with a
special stub. Instead, key on the map and handler mechanism for more
uniform
treatment.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/581273005
Patch from Jing Bao <[email protected]>.
https://code.google.com/p/v8/source/detail?r=24063
Modified:
/branches/bleeding_edge/src/ic/x87/ic-x87.cc
/branches/bleeding_edge/src/x87/code-stubs-x87.cc
=======================================
--- /branches/bleeding_edge/src/ic/x87/ic-x87.cc Fri Sep 12 01:39:25 2014
UTC
+++ /branches/bleeding_edge/src/ic/x87/ic-x87.cc Fri Sep 19 06:33:37 2014
UTC
@@ -503,48 +503,6 @@
__ bind(&miss);
GenerateMiss(masm);
}
-
-
-void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
- // Return address is on the stack.
- Label slow;
-
- Register receiver = LoadDescriptor::ReceiverRegister();
- Register key = LoadDescriptor::NameRegister();
- Register scratch = eax;
- DCHECK(!scratch.is(receiver) && !scratch.is(key));
-
- // Check that the receiver isn't a smi.
- __ JumpIfSmi(receiver, &slow);
-
- // Check that the key is an array index, that is Uint32.
- __ test(key, Immediate(kSmiTagMask | kSmiSignMask));
- __ j(not_zero, &slow);
-
- // Get the map of the receiver.
- __ mov(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
-
- // Check that it has indexed interceptor and access checks
- // are not enabled for this object.
- __ movzx_b(scratch, FieldOperand(scratch, Map::kBitFieldOffset));
- __ and_(scratch, Immediate(kSlowCaseBitFieldMask));
- __ cmp(scratch, Immediate(1 << Map::kHasIndexedInterceptor));
- __ j(not_zero, &slow);
-
- // Everything is fine, call runtime.
- __ pop(scratch);
- __ push(receiver); // receiver
- __ push(key); // key
- __ push(scratch); // return address
-
- // Perform tail call to the entry.
- ExternalReference ref = ExternalReference(
- IC_Utility(kLoadElementWithInterceptor), masm->isolate());
- __ TailCallExternalReference(ref, 2, 1);
-
- __ bind(&slow);
- GenerateMiss(masm);
-}
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
=======================================
--- /branches/bleeding_edge/src/x87/code-stubs-x87.cc Fri Sep 19 06:31:33
2014 UTC
+++ /branches/bleeding_edge/src/x87/code-stubs-x87.cc Fri Sep 19 06:33:37
2014 UTC
@@ -329,6 +329,36 @@
PropertyAccessCompiler::TailCallBuiltin(
masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
}
+
+
+void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
+ // Return address is on the stack.
+ Label slow;
+
+ Register receiver = LoadDescriptor::ReceiverRegister();
+ Register key = LoadDescriptor::NameRegister();
+ Register scratch = eax;
+ DCHECK(!scratch.is(receiver) && !scratch.is(key));
+
+ // Check that the key is an array index, that is Uint32.
+ __ test(key, Immediate(kSmiTagMask | kSmiSignMask));
+ __ j(not_zero, &slow);
+
+ // Everything is fine, call runtime.
+ __ pop(scratch);
+ __ push(receiver); // receiver
+ __ push(key); // key
+ __ push(scratch); // return address
+
+ // Perform tail call to the entry.
+ ExternalReference ref = ExternalReference(
+ IC_Utility(IC::kLoadElementWithInterceptor), masm->isolate());
+ __ TailCallExternalReference(ref, 2, 1);
+
+ __ bind(&slow);
+ PropertyAccessCompiler::TailCallBuiltin(
+ masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
+}
void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.