Reviewers: mvstanton,

Message:
PTAL.
Necessary since now the handlers are strictmode-independent.

Description:
Fetch strictmode in the interceptor setter from the IC.

Please review this at https://chromiumcodereview.appspot.com/95373002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+11, -16 lines):
  M src/arm/stub-cache-arm.cc
  M src/ia32/stub-cache-ia32.cc
  M src/stub-cache.cc
  M src/x64/stub-cache-x64.cc


Index: src/arm/stub-cache-arm.cc
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
index 4f40f5e08aa2c9e8e3ad61822a82c8637ed0b739..589f1908fcec160f0bb59c95969934a460c2394f 100644
--- a/src/arm/stub-cache-arm.cc
+++ b/src/arm/stub-cache-arm.cc
@@ -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);
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 6d8950960546b24601888fafdf2a6f4bea73df52..c1f6eae0265e74e17766ca67fb6bc3182b664ca9 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -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);
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index 480a17b6898706d78af54f8727b3805cdc7efd25..046382cffa0197c90777e97a6687a62f9ec3084b 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -932,16 +932,16 @@ 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;
 }
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index cfe94b6d69796b0c48e7499a3bd0721b298c5d01..ad39b51e961e3d3ea1963d09cd1e56a03458629a 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -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);


--
--
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/groups/opt_out.

Reply via email to