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

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

Issue 1555743003: [turbofan] Port Crankshaft's weak objects mechanism to TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 12 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 | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/test-heap.cc
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
index a4cbed3d95007336897cff8e4af2293995fa9ff2..94dd1bb7741250e30987d9c7b2d586c60206eaa9 100644
--- a/test/cctest/heap/test-heap.cc
+++ b/test/cctest/heap/test-heap.cc
@@ -4766,17 +4766,19 @@ TEST(CellsInOptimizedCodeAreWeak) {
LocalContext context;
HandleScope scope(heap->isolate());
- CompileRun("bar = (function() {"
- " function bar() {"
- " return foo(1);"
- " };"
- " var foo = function(x) { with (x) { return 1 + x; } };"
- " bar(foo);"
- " bar(foo);"
- " bar(foo);"
- " %OptimizeFunctionOnNextCall(bar);"
- " bar(foo);"
- " return bar;})();");
+ CompileRun(
+ "bar = (function() {"
+ " function bar() {"
+ " return foo(1);"
+ " };"
+ " var foo = function(x) { with (x) { return 1 + x; } };"
+ " %NeverOptimizeFunction(foo);"
+ " bar(foo);"
+ " bar(foo);"
+ " bar(foo);"
+ " %OptimizeFunctionOnNextCall(bar);"
+ " bar(foo);"
+ " return bar;})();");
Handle<JSFunction> bar = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
*v8::Local<v8::Function>::Cast(CcTest::global()
@@ -4809,15 +4811,17 @@ TEST(ObjectsInOptimizedCodeAreWeak) {
LocalContext context;
HandleScope scope(heap->isolate());
- CompileRun("function bar() {"
- " return foo(1);"
- "};"
- "function foo(x) { with (x) { return 1 + x; } };"
- "bar();"
- "bar();"
- "bar();"
- "%OptimizeFunctionOnNextCall(bar);"
- "bar();");
+ CompileRun(
+ "function bar() {"
+ " return foo(1);"
+ "};"
+ "function foo(x) { with (x) { return 1 + x; } };"
+ "%NeverOptimizeFunction(foo);"
+ "bar();"
+ "bar();"
+ "bar();"
+ "%OptimizeFunctionOnNextCall(bar);"
+ "bar();");
Handle<JSFunction> bar = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
*v8::Local<v8::Function>::Cast(CcTest::global()
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698