Index: test/cctest/test-compiler.cc |
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc |
index 1fac0d3746748ec4e15bbad158a5a1cf7569d98a..e15aef74a0cfa0dda5ca6929d8106bb25157a5a4 100644 |
--- a/test/cctest/test-compiler.cc |
+++ b/test/cctest/test-compiler.cc |
@@ -298,10 +298,8 @@ TEST(FeedbackVectorPreservedAcrossRecompiles) { |
"fun1 = fun;" |
"function f(a) { a(); } f(fun1);"); |
- Handle<JSFunction> f = |
- v8::Utils::OpenHandle( |
- *v8::Handle<v8::Function>::Cast( |
- CcTest::global()->Get(v8_str("f")))); |
+ Handle<JSFunction> f = Handle<JSFunction>::cast(v8::Utils::OpenHandle( |
+ *v8::Handle<v8::Function>::Cast(CcTest::global()->Get(v8_str("f"))))); |
// We shouldn't have deoptimization support. We want to recompile and |
// verify that our feedback vector preserves information. |
@@ -344,10 +342,9 @@ TEST(FeedbackVectorUnaffectedByScopeChanges) { |
"}" |
"morphing_call = builder();"); |
- Handle<JSFunction> f = |
- v8::Utils::OpenHandle( |
- *v8::Handle<v8::Function>::Cast( |
- CcTest::global()->Get(v8_str("morphing_call")))); |
+ Handle<JSFunction> f = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Handle<v8::Function>::Cast( |
+ CcTest::global()->Get(v8_str("morphing_call"))))); |
// Not compiled, and so no feedback vector allocated yet. |
CHECK(!f->shared()->is_compiled()); |
@@ -382,10 +379,12 @@ TEST(OptimizedCodeSharing1) { |
"%DebugPrint(closure0());" |
"var closure1 = MakeClosure();" |
"var closure2 = MakeClosure();"); |
- Handle<JSFunction> fun1 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure1")))); |
- Handle<JSFunction> fun2 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure2")))); |
+ Handle<JSFunction> fun1 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure1"))))); |
+ Handle<JSFunction> fun2 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure2"))))); |
CHECK(fun1->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
CHECK(fun2->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
CHECK_EQ(fun1->code(), fun2->code()); |
@@ -419,8 +418,9 @@ TEST(OptimizedCodeSharing2) { |
"%DebugPrint(closure0());" |
"%OptimizeFunctionOnNextCall(closure0);" |
"%DebugPrint(closure0());"); |
- Handle<JSFunction> fun0 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure0")))); |
+ Handle<JSFunction> fun0 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure0"))))); |
CHECK(fun0->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
reference_code = handle(fun0->code()); |
} |
@@ -436,10 +436,12 @@ TEST(OptimizedCodeSharing2) { |
"%DebugPrint(closure0());" |
"var closure1 = MakeClosure();" |
"var closure2 = MakeClosure();"); |
- Handle<JSFunction> fun1 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure1")))); |
- Handle<JSFunction> fun2 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure2")))); |
+ Handle<JSFunction> fun1 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure1"))))); |
+ Handle<JSFunction> fun2 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure2"))))); |
CHECK(fun1->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
CHECK(fun2->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
CHECK_EQ(*reference_code, fun1->code()); |
@@ -474,8 +476,9 @@ TEST(OptimizedCodeSharing3) { |
"%DebugPrint(closure0());" |
"%OptimizeFunctionOnNextCall(closure0);" |
"%DebugPrint(closure0());"); |
- Handle<JSFunction> fun0 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure0")))); |
+ Handle<JSFunction> fun0 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure0"))))); |
CHECK(fun0->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
reference_code = handle(fun0->code()); |
// Evict only the context-dependent entry from the optimized code map. This |
@@ -494,10 +497,12 @@ TEST(OptimizedCodeSharing3) { |
"%DebugPrint(closure0());" |
"var closure1 = MakeClosure();" |
"var closure2 = MakeClosure();"); |
- Handle<JSFunction> fun1 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure1")))); |
- Handle<JSFunction> fun2 = v8::Utils::OpenHandle( |
- *v8::Local<v8::Function>::Cast(env->Global()->Get(v8_str("closure2")))); |
+ Handle<JSFunction> fun1 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure1"))))); |
+ Handle<JSFunction> fun2 = Handle<JSFunction>::cast( |
+ v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast( |
+ env->Global()->Get(v8_str("closure2"))))); |
CHECK(fun1->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
CHECK(fun2->IsOptimized() || !CcTest::i_isolate()->use_crankshaft()); |
CHECK_EQ(*reference_code, fun1->code()); |
@@ -644,10 +649,10 @@ TEST(CompileFunctionInContextScriptOrigin) { |
#ifdef ENABLE_DISASSEMBLER |
static Handle<JSFunction> GetJSFunction(v8::Handle<v8::Object> obj, |
- const char* property_name) { |
+ const char* property_name) { |
v8::Local<v8::Function> fun = |
v8::Local<v8::Function>::Cast(obj->Get(v8_str(property_name))); |
- return v8::Utils::OpenHandle(*fun); |
+ return Handle<JSFunction>::cast(v8::Utils::OpenHandle(*fun)); |
} |