Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: test/cctest/test-compiler.cc

Issue 2680313002: Count closures using the feedback vector cell map, specialize if count==1. (Closed)
Patch Set: Only specialize if compiling from bytecode Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | test/debugger/debug/debug-liveedit-double-call.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index e257f2a2eef5201fae3da3311a8e34664da4777f..57686d0ee5084fd3cd23db05a839267b86f53251 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -385,10 +385,12 @@ TEST(OptimizedCodeSharing1) {
" return function() { return x; };"
"}"
"var closure0 = MakeClosure();"
+ "var closure1 = MakeClosure();" // We only share optimized code
+ // if there are at least two closures.
"%DebugPrint(closure0());"
"%OptimizeFunctionOnNextCall(closure0);"
"%DebugPrint(closure0());"
- "var closure1 = MakeClosure(); closure1();"
+ "closure1();"
"var closure2 = MakeClosure(); closure2();");
Handle<JSFunction> fun1 = Handle<JSFunction>::cast(
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
« no previous file with comments | « src/objects.cc ('k') | test/debugger/debug/debug-liveedit-double-call.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698