Push version 1.2.7 to trunk.
Improved debugger and profiler support.
Reduced compilation time by improving the handling of deferred code.
Optimized interceptor accesses where the property is on the object on which the interceptors is attached.
Fixed compilation problem on GCC 4.4 by changing the stack alignment to 16 bytes.
Fixed handle creation to follow stric aliasing rules.
Fixed compilation on FreeBSD.
Introduced API for forcing the deletion of a property ignoring interceptors and attributes.
git-svn-id: http://v8.googlecode.com/svn/trunk@2121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 6c675f9..b31f706 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -322,6 +322,7 @@
void StubCompiler::GenerateLoadInterceptor(MacroAssembler* masm,
JSObject* object,
JSObject* holder,
+ Smi* lookup_hint,
Register receiver,
Register name,
Register scratch1,
@@ -340,12 +341,15 @@
__ push(receiver); // receiver
__ push(reg); // holder
__ push(name); // name
+ // TODO(367): Maybe don't push lookup_hint for LOOKUP_IN_HOLDER and/or
+ // LOOKUP_IN_PROTOTYPE, but use a special version of lookup method?
+ __ push(Immediate(lookup_hint));
__ push(scratch2); // restore return address
// Do tail-call to the runtime system.
ExternalReference load_ic_property =
ExternalReference(IC_Utility(IC::kLoadInterceptorProperty));
- __ TailCallRuntime(load_ic_property, 3);
+ __ TailCallRuntime(load_ic_property, 4);
}
@@ -670,11 +674,12 @@
__ push(edx); // receiver
__ push(reg); // holder
__ push(Operand(ebp, (argc + 3) * kPointerSize)); // name
+ __ push(Immediate(holder->InterceptorPropertyLookupHint(name)));
// Perform call.
ExternalReference load_interceptor =
ExternalReference(IC_Utility(IC::kLoadInterceptorProperty));
- __ mov(eax, Immediate(3));
+ __ mov(eax, Immediate(4));
__ mov(ebx, Immediate(load_interceptor));
CEntryStub stub;
@@ -974,7 +979,18 @@
Label miss;
__ mov(eax, (Operand(esp, kPointerSize)));
- GenerateLoadInterceptor(masm(), receiver, holder, eax, ecx, edx, ebx, &miss);
+ // TODO(368): Compile in the whole chain: all the interceptors in
+ // prototypes and ultimate answer.
+ GenerateLoadInterceptor(masm(),
+ receiver,
+ holder,
+ holder->InterceptorPropertyLookupHint(name),
+ eax,
+ ecx,
+ edx,
+ ebx,
+ &miss);
+
__ bind(&miss);
GenerateLoadMiss(masm(), Code::LOAD_IC);
@@ -1089,7 +1105,15 @@
__ cmp(Operand(eax), Immediate(Handle<String>(name)));
__ j(not_equal, &miss, not_taken);
- GenerateLoadInterceptor(masm(), receiver, holder, ecx, eax, edx, ebx, &miss);
+ GenerateLoadInterceptor(masm(),
+ receiver,
+ holder,
+ Smi::FromInt(JSObject::kLookupInHolder),
+ ecx,
+ eax,
+ edx,
+ ebx,
+ &miss);
__ bind(&miss);
__ DecrementCounter(&Counters::keyed_load_interceptor, 1);
GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC);