Revision: 16597
Author:   [email protected]
Date:     Mon Sep  9 15:03:03 2013 UTC
Log:      put js accessor ics behind a flags until fixed

[email protected]
BUG=

Review URL: https://codereview.chromium.org/23816009
http://code.google.com/p/v8/source/detail?r=16597

Modified:
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/ic.cc
 /branches/bleeding_edge/test/cctest/test-accessors.cc

=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Wed Sep 4 13:46:12 2013 UTC +++ /branches/bleeding_edge/src/flag-definitions.h Mon Sep 9 15:03:03 2013 UTC
@@ -545,6 +545,7 @@
             "Use idle notification to reduce memory footprint.")
 // ic.cc
 DEFINE_bool(use_ic, true, "use inline caching")
+DEFINE_bool(js_accessor_ics, false, "create ics for js accessors")

 // macro-assembler-ia32.cc
 DEFINE_bool(native_code_counters, false,
=======================================
--- /branches/bleeding_edge/src/ic.cc   Fri Sep  6 11:31:25 2013 UTC
+++ /branches/bleeding_edge/src/ic.cc   Mon Sep  9 15:03:03 2013 UTC
@@ -1360,7 +1360,8 @@
         Handle<JSFunction> function = Handle<JSFunction>::cast(getter);
         CallOptimization call_optimization(function);
         if (call_optimization.is_simple_api_call() &&
-            call_optimization.IsCompatibleReceiver(*receiver)) {
+            call_optimization.IsCompatibleReceiver(*receiver) &&
+            FLAG_js_accessor_ics) {
           return isolate()->stub_cache()->ComputeLoadCallback(
               name, receiver, holder, call_optimization);
         }
@@ -1568,7 +1569,8 @@
         Handle<JSFunction> function = Handle<JSFunction>::cast(getter);
         CallOptimization call_optimization(function);
         if (call_optimization.is_simple_api_call() &&
-            call_optimization.IsCompatibleReceiver(*receiver)) {
+            call_optimization.IsCompatibleReceiver(*receiver) &&
+            FLAG_js_accessor_ics) {
           return isolate()->stub_cache()->ComputeKeyedLoadCallback(
               name, receiver, holder, call_optimization);
         }
@@ -1834,7 +1836,8 @@
         Handle<JSFunction> function = Handle<JSFunction>::cast(setter);
         CallOptimization call_optimization(function);
         if (call_optimization.is_simple_api_call() &&
-            call_optimization.IsCompatibleReceiver(*receiver)) {
+            call_optimization.IsCompatibleReceiver(*receiver) &&
+            FLAG_js_accessor_ics) {
           return isolate()->stub_cache()->ComputeStoreCallback(
               name, receiver, holder, call_optimization, strict_mode);
         }
=======================================
--- /branches/bleeding_edge/test/cctest/test-accessors.cc Thu Sep 5 11:18:52 2013 UTC +++ /branches/bleeding_edge/test/cctest/test-accessors.cc Mon Sep 9 15:03:03 2013 UTC
@@ -552,3 +552,18 @@
v8::Handle<v8::String> expected = v8_str("{\"regress\":\"crbug-161028\"}");
   CHECK(CompileRun("JSON.stringify(obj)")->Equals(expected));
 }
+
+
+THREADED_TEST(CrossContextAccess) {
+  LocalContext env;
+  v8::Isolate* isolate = env->GetIsolate();
+  v8::HandleScope scope(isolate);
+ v8::Handle<v8::Function> fun = v8::Function::New(isolate, handle_property);
+  LocalContext switch_context;
+  switch_context->Global()->Set(v8_str("fun"), fun);
+  v8::TryCatch try_catch;
+  CompileRun(
+      "var o = Object.create(null, { n: { get:fun } });"
+      "for (var i = 0; i < 10; i++) o.n;");
+  CHECK(!try_catch.HasCaught());
+}

--
--
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