Commit 60d995fc authored by verwaest@chromium.org's avatar verwaest@chromium.org

Fetch strictmode in the interceptor setter from the IC.

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent cb481195
......@@ -2621,13 +2621,10 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
__ mov(scratch1(), Operand(Smi::FromInt(strict_mode())));
__ push(scratch1()); // strict mode
// Do tail-call to the runtime system.
ExternalReference store_ic_property =
ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
__ TailCallExternalReference(store_ic_property, 4, 1);
__ TailCallExternalReference(store_ic_property, 3, 1);
// Handle store cache miss.
__ bind(&miss);
......
......@@ -2728,13 +2728,12 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
__ push(receiver());
__ push(this->name());
__ push(value());
__ push(Immediate(Smi::FromInt(strict_mode())));
__ push(scratch1()); // restore return address
// Do tail-call to the runtime system.
ExternalReference store_ic_property =
ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
__ TailCallExternalReference(store_ic_property, 4, 1);
__ TailCallExternalReference(store_ic_property, 3, 1);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
......
......@@ -932,16 +932,15 @@ RUNTIME_FUNCTION(MaybeObject*, LoadPropertyWithInterceptorForCall) {
RUNTIME_FUNCTION(MaybeObject*, StoreInterceptorProperty) {
HandleScope scope(isolate);
ASSERT(args.length() == 4);
Handle<JSObject> recv(JSObject::cast(args[0]));
Handle<Name> name(Name::cast(args[1]));
Handle<Object> value(args[2], isolate);
ASSERT(args.smi_at(3) == kStrictMode || args.smi_at(3) == kNonStrictMode);
StrictModeFlag strict_mode = static_cast<StrictModeFlag>(args.smi_at(3));
ASSERT(recv->HasNamedInterceptor());
ASSERT(args.length() == 3);
StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
Handle<JSObject> receiver = args.at<JSObject>(0);
Handle<Name> name = args.at<Name>(1);
Handle<Object> value = args.at<Object>(2);
ASSERT(receiver->HasNamedInterceptor());
PropertyAttributes attr = NONE;
Handle<Object> result = JSObject::SetPropertyWithInterceptor(
recv, name, value, attr, strict_mode);
receiver, name, value, attr, ic.strict_mode());
RETURN_IF_EMPTY_HANDLE(isolate, result);
return *result;
}
......
......@@ -2643,13 +2643,12 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
__ push(receiver());
__ push(this->name());
__ push(value());
__ Push(Smi::FromInt(strict_mode()));
__ PushReturnAddressFrom(scratch1());
// Do tail-call to the runtime system.
ExternalReference store_ic_property =
ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
__ TailCallExternalReference(store_ic_property, 4, 1);
__ TailCallExternalReference(store_ic_property, 3, 1);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
......
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