Commit 80545b59 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Minor cleanup in calling interceptors for loading properties.

R=mvstanton@chromium.org

Review URL: https://chromiumcodereview.appspot.com/82743003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 149516c6
...@@ -798,17 +798,12 @@ static void CompileCallLoadPropertyWithInterceptor( ...@@ -798,17 +798,12 @@ static void CompileCallLoadPropertyWithInterceptor(
Register receiver, Register receiver,
Register holder, Register holder,
Register name, Register name,
Handle<JSObject> holder_obj) { Handle<JSObject> holder_obj,
IC::UtilityId id) {
PushInterceptorArguments(masm, receiver, holder, name, holder_obj); PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallExternalReference(
ExternalReference ref = ExternalReference(IC_Utility(id), masm->isolate()),
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly), StubCache::kInterceptorArgsLength);
masm->isolate());
__ mov(r0, Operand(StubCache::kInterceptorArgsLength));
__ mov(r1, Operand(ref));
CEntryStub stub(1);
__ CallStub(&stub);
} }
...@@ -1113,11 +1108,11 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -1113,11 +1108,11 @@ class CallInterceptorCompiler BASE_EMBEDDED {
FrameScope scope(masm, StackFrame::INTERNAL); FrameScope scope(masm, StackFrame::INTERNAL);
// Save the name_ register across the call. // Save the name_ register across the call.
__ push(name_); __ push(name_);
PushInterceptorArguments(masm, receiver, holder, name_, interceptor_holder);
__ CallExternalReference( CompileCallLoadPropertyWithInterceptor(
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall), masm, receiver, holder, name_, interceptor_holder,
masm->isolate()), IC::kLoadPropertyWithInterceptorForCall);
StubCache::kInterceptorArgsLength);
// Restore the name_ register. // Restore the name_ register.
__ pop(name_); __ pop(name_);
// Leave the internal frame. // Leave the internal frame.
...@@ -1132,11 +1127,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -1132,11 +1127,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
{ {
FrameScope scope(masm, StackFrame::INTERNAL); FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(holder, name_); __ Push(holder, name_);
CompileCallLoadPropertyWithInterceptor(masm, CompileCallLoadPropertyWithInterceptor(
receiver, masm, receiver, holder, name_, holder_obj,
holder, IC::kLoadPropertyWithInterceptorOnly);
name_,
holder_obj);
__ pop(name_); // Restore the name. __ pop(name_); // Restore the name.
__ pop(receiver); // Restore the holder. __ pop(receiver); // Restore the holder.
} }
...@@ -1503,11 +1496,10 @@ void LoadStubCompiler::GenerateLoadInterceptor( ...@@ -1503,11 +1496,10 @@ void LoadStubCompiler::GenerateLoadInterceptor(
// Invoke an interceptor. Note: map checks from receiver to // Invoke an interceptor. Note: map checks from receiver to
// interceptor's holder has been compiled before (see a caller // interceptor's holder has been compiled before (see a caller
// of this method.) // of this method.)
CompileCallLoadPropertyWithInterceptor(masm(), CompileCallLoadPropertyWithInterceptor(
receiver(), masm(), receiver(), holder_reg, this->name(), interceptor_holder,
holder_reg, IC::kLoadPropertyWithInterceptorOnly);
this->name(),
interceptor_holder);
// Check if interceptor provided a value for property. If it's // Check if interceptor provided a value for property. If it's
// the case, return immediately. // the case, return immediately.
Label interceptor_failed; Label interceptor_failed;
......
...@@ -405,11 +405,11 @@ static void CompileCallLoadPropertyWithInterceptor( ...@@ -405,11 +405,11 @@ static void CompileCallLoadPropertyWithInterceptor(
Register receiver, Register receiver,
Register holder, Register holder,
Register name, Register name,
Handle<JSObject> holder_obj) { Handle<JSObject> holder_obj,
IC::UtilityId id) {
PushInterceptorArguments(masm, receiver, holder, name, holder_obj); PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallExternalReference( __ CallExternalReference(
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly), ExternalReference(IC_Utility(id), masm->isolate()),
masm->isolate()),
StubCache::kInterceptorArgsLength); StubCache::kInterceptorArgsLength);
} }
...@@ -797,12 +797,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -797,12 +797,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
// Save the name_ register across the call. // Save the name_ register across the call.
__ push(name_); __ push(name_);
PushInterceptorArguments(masm, receiver, holder, name_, interceptor_holder); CompileCallLoadPropertyWithInterceptor(
masm, receiver, holder, name_, interceptor_holder,
__ CallExternalReference( IC::kLoadPropertyWithInterceptorForCall);
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall),
masm->isolate()),
StubCache::kInterceptorArgsLength);
// Restore the name_ register. // Restore the name_ register.
__ pop(name_); __ pop(name_);
...@@ -820,11 +817,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -820,11 +817,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
__ push(holder); // Save the holder. __ push(holder); // Save the holder.
__ push(name_); // Save the name. __ push(name_); // Save the name.
CompileCallLoadPropertyWithInterceptor(masm, CompileCallLoadPropertyWithInterceptor(
receiver, masm, receiver, holder, name_, holder_obj,
holder, IC::kLoadPropertyWithInterceptorOnly);
name_,
holder_obj);
__ pop(name_); // Restore the name. __ pop(name_); // Restore the name.
__ pop(receiver); // Restore the holder. __ pop(receiver); // Restore the holder.
...@@ -1553,11 +1548,9 @@ void LoadStubCompiler::GenerateLoadInterceptor( ...@@ -1553,11 +1548,9 @@ void LoadStubCompiler::GenerateLoadInterceptor(
// Invoke an interceptor. Note: map checks from receiver to // Invoke an interceptor. Note: map checks from receiver to
// interceptor's holder has been compiled before (see a caller // interceptor's holder has been compiled before (see a caller
// of this method.) // of this method.)
CompileCallLoadPropertyWithInterceptor(masm(), CompileCallLoadPropertyWithInterceptor(
receiver(), masm(), receiver(), holder_reg, this->name(), interceptor_holder,
holder_reg, IC::kLoadPropertyWithInterceptorOnly);
this->name(),
interceptor_holder);
// Check if interceptor provided a value for property. If it's // Check if interceptor provided a value for property. If it's
// the case, return immediately. // the case, return immediately.
......
...@@ -379,17 +379,12 @@ static void CompileCallLoadPropertyWithInterceptor( ...@@ -379,17 +379,12 @@ static void CompileCallLoadPropertyWithInterceptor(
Register receiver, Register receiver,
Register holder, Register holder,
Register name, Register name,
Handle<JSObject> holder_obj) { Handle<JSObject> holder_obj,
IC::UtilityId id) {
PushInterceptorArguments(masm, receiver, holder, name, holder_obj); PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
__ CallExternalReference(
ExternalReference ref = ExternalReference(IC_Utility(id), masm->isolate()),
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly), StubCache::kInterceptorArgsLength);
masm->isolate());
__ Set(rax, StubCache::kInterceptorArgsLength);
__ LoadAddress(rbx, ref);
CEntryStub stub(1);
__ CallStub(&stub);
} }
...@@ -794,12 +789,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -794,12 +789,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
// Save the name_ register across the call. // Save the name_ register across the call.
__ push(name_); __ push(name_);
PushInterceptorArguments(masm, receiver, holder, name_, interceptor_holder); CompileCallLoadPropertyWithInterceptor(
masm, receiver, holder, name_, interceptor_holder,
__ CallExternalReference( IC::kLoadPropertyWithInterceptorForCall);
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorForCall),
masm->isolate()),
StubCache::kInterceptorArgsLength);
// Restore the name_ register. // Restore the name_ register.
__ pop(name_); __ pop(name_);
...@@ -817,11 +809,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -817,11 +809,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
__ push(holder); // Save the holder. __ push(holder); // Save the holder.
__ push(name_); // Save the name. __ push(name_); // Save the name.
CompileCallLoadPropertyWithInterceptor(masm, CompileCallLoadPropertyWithInterceptor(
receiver, masm, receiver, holder, name_, holder_obj,
holder, IC::kLoadPropertyWithInterceptorOnly);
name_,
holder_obj);
__ pop(name_); // Restore the name. __ pop(name_); // Restore the name.
__ pop(receiver); // Restore the holder. __ pop(receiver); // Restore the holder.
...@@ -1501,11 +1491,9 @@ void LoadStubCompiler::GenerateLoadInterceptor( ...@@ -1501,11 +1491,9 @@ void LoadStubCompiler::GenerateLoadInterceptor(
// Invoke an interceptor. Note: map checks from receiver to // Invoke an interceptor. Note: map checks from receiver to
// interceptor's holder has been compiled before (see a caller // interceptor's holder has been compiled before (see a caller
// of this method.) // of this method.)
CompileCallLoadPropertyWithInterceptor(masm(), CompileCallLoadPropertyWithInterceptor(
receiver(), masm(), receiver(), holder_reg, this->name(), interceptor_holder,
holder_reg, IC::kLoadPropertyWithInterceptorOnly);
this->name(),
interceptor_holder);
// Check if interceptor provided a value for property. If it's // Check if interceptor provided a value for property. If it's
// the case, return immediately. // the case, return immediately.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment