Commit 4ce1b018 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Minor cleanup in calling interceptors for loading properties.

Port r18054 (59d9d99)

BUG=

Review URL: https://codereview.chromium.org/84943008

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 27eb59ae
......@@ -785,17 +785,12 @@ static void CompileCallLoadPropertyWithInterceptor(
Register receiver,
Register holder,
Register name,
Handle<JSObject> holder_obj) {
Handle<JSObject> holder_obj,
IC::UtilityId id) {
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
ExternalReference ref =
ExternalReference(IC_Utility(IC::kLoadPropertyWithInterceptorOnly),
masm->isolate());
__ PrepareCEntryArgs(StubCache::kInterceptorArgsLength);
__ PrepareCEntryFunction(ref);
CEntryStub stub(1);
__ CallStub(&stub);
__ CallExternalReference(
ExternalReference(IC_Utility(id), masm->isolate()),
StubCache::kInterceptorArgsLength);
}
......@@ -1101,13 +1096,10 @@ class CallInterceptorCompiler BASE_EMBEDDED {
// Save the name_ register across the call.
__ push(name_);
PushInterceptorArguments(masm, receiver, holder, name_, interceptor_holder);
CompileCallLoadPropertyWithInterceptor(
masm, receiver, holder, name_, interceptor_holder,
IC::kLoadPropertyWithInterceptorForCall);
__ CallExternalReference(
ExternalReference(
IC_Utility(IC::kLoadPropertyWithInterceptorForCall),
masm->isolate()),
StubCache::kInterceptorArgsLength);
// Restore the name_ register.
__ pop(name_);
// Leave the internal frame.
......@@ -1123,11 +1115,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(holder, name_);
CompileCallLoadPropertyWithInterceptor(masm,
receiver,
holder,
name_,
holder_obj);
CompileCallLoadPropertyWithInterceptor(
masm, receiver, holder, name_, holder_obj,
IC::kLoadPropertyWithInterceptorOnly);
__ pop(name_); // Restore the name.
__ pop(receiver); // Restore the holder.
}
......@@ -1496,11 +1486,10 @@ void LoadStubCompiler::GenerateLoadInterceptor(
// Invoke an interceptor. Note: map checks from receiver to
// interceptor's holder has been compiled before (see a caller
// of this method).
CompileCallLoadPropertyWithInterceptor(masm(),
receiver(),
holder_reg,
this->name(),
interceptor_holder);
CompileCallLoadPropertyWithInterceptor(
masm(), receiver(), holder_reg, this->name(), interceptor_holder,
IC::kLoadPropertyWithInterceptorOnly);
// Check if interceptor provided a value for property. If it's
// the case, return immediately.
Label interceptor_failed;
......
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