Index: test/cctest/test-compiler.cc |
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc |
index 32d720e24e5f35961d03c319ae5b61e1139af289..18f00097cdedd10fc3835d2f063bb3b4c7114fb3 100644 |
--- a/test/cctest/test-compiler.cc |
+++ b/test/cctest/test-compiler.cc |
@@ -364,9 +364,7 @@ TEST(FeedbackVectorUnaffectedByScopeChanges) { |
CHECK(!f->shared()->feedback_vector()->is_empty()); |
} |
- |
-// Test that optimized code for different closures is actually shared |
-// immediately by the FastNewClosureStub when run in the same context. |
+// Test that optimized code for different closures is actually shared. |
TEST(OptimizedCodeSharing1) { |
FLAG_stress_compaction = false; |
FLAG_allow_natives_syntax = true; |
@@ -385,8 +383,8 @@ TEST(OptimizedCodeSharing1) { |
"%DebugPrint(closure0());" |
"%OptimizeFunctionOnNextCall(closure0);" |
"%DebugPrint(closure0());" |
- "var closure1 = MakeClosure();" |
- "var closure2 = MakeClosure();"); |
+ "var closure1 = MakeClosure(); closure1();" |
+ "var closure2 = MakeClosure(); closure2();"); |
Handle<JSFunction> fun1 = Handle<JSFunction>::cast( |
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
env->Global() |
@@ -403,9 +401,7 @@ TEST(OptimizedCodeSharing1) { |
} |
} |
- |
-// Test that optimized code for different closures is actually shared |
-// immediately by the FastNewClosureStub when run different contexts. |
+// Test that optimized code for different closures is actually shared. |
TEST(OptimizedCodeSharing2) { |
if (FLAG_stress_compaction) return; |
FLAG_allow_natives_syntax = true; |
@@ -456,8 +452,8 @@ TEST(OptimizedCodeSharing2) { |
"%DebugPrint(closure0());" |
"%OptimizeFunctionOnNextCall(closure0);" |
"%DebugPrint(closure0());" |
- "var closure1 = MakeClosure();" |
- "var closure2 = MakeClosure();"); |
+ "var closure1 = MakeClosure(); closure1();" |
+ "var closure2 = MakeClosure(); closure2();"); |
Handle<JSFunction> fun1 = Handle<JSFunction>::cast( |
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
env->Global() |
@@ -475,9 +471,7 @@ TEST(OptimizedCodeSharing2) { |
} |
} |
- |
-// Test that optimized code for different closures is actually shared |
-// immediately by the FastNewClosureStub without context-dependent entries. |
+// Test that optimized code for different closures is actually shared. |
TEST(OptimizedCodeSharing3) { |
if (FLAG_stress_compaction) return; |
FLAG_allow_natives_syntax = true; |
@@ -531,8 +525,8 @@ TEST(OptimizedCodeSharing3) { |
"%DebugPrint(closure0());" |
"%OptimizeFunctionOnNextCall(closure0);" |
"%DebugPrint(closure0());" |
- "var closure1 = MakeClosure();" |
- "var closure2 = MakeClosure();"); |
+ "var closure1 = MakeClosure(); closure1();" |
+ "var closure2 = MakeClosure(); closure2();"); |
Handle<JSFunction> fun1 = Handle<JSFunction>::cast( |
v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
env->Global() |