| Index: test/cctest/compiler/function-tester.h
|
| diff --git a/test/cctest/compiler/function-tester.h b/test/cctest/compiler/function-tester.h
|
| index 2ef46eb4cbd778009f1ae087dfcb009e0868392c..c869f00d1931af18a4f07eaff12e38e0d579f835 100644
|
| --- a/test/cctest/compiler/function-tester.h
|
| +++ b/test/cctest/compiler/function-tester.h
|
| @@ -57,11 +57,7 @@ class FunctionTester : public InitializedHandleScope {
|
| }
|
| CHECK(Rewriter::Rewrite(&info));
|
| CHECK(Scope::Analyze(&info));
|
| - CHECK_NE(NULL, info.scope());
|
| - Handle<ScopeInfo> scope_info = ScopeInfo::Create(info.scope(), info.zone());
|
| - info.shared_info()->set_scope_info(*scope_info);
|
| -
|
| - EnsureDeoptimizationSupport(&info);
|
| + CHECK(Compiler::EnsureDeoptimizationSupport(&info));
|
|
|
| Pipeline pipeline(&info);
|
| Handle<Code> code = pipeline.GenerateCode();
|
| @@ -87,23 +83,6 @@ class FunctionTester : public InitializedHandleScope {
|
| return function;
|
| }
|
|
|
| - static void EnsureDeoptimizationSupport(CompilationInfo* info) {
|
| - bool should_recompile = !info->shared_info()->has_deoptimization_support();
|
| - if (should_recompile) {
|
| - CompilationInfoWithZone unoptimized(info->shared_info());
|
| - // Note that we use the same AST that we will use for generating the
|
| - // optimized code.
|
| - unoptimized.SetFunction(info->function());
|
| - unoptimized.PrepareForCompilation(info->scope());
|
| - unoptimized.SetContext(info->context());
|
| - if (should_recompile) unoptimized.EnableDeoptimizationSupport();
|
| - bool succeeded = FullCodeGenerator::MakeCode(&unoptimized);
|
| - CHECK(succeeded);
|
| - Handle<SharedFunctionInfo> shared = info->shared_info();
|
| - shared->EnableDeoptimizationSupport(*unoptimized.code());
|
| - }
|
| - }
|
| -
|
| MaybeHandle<Object> Call(Handle<Object> a, Handle<Object> b) {
|
| Handle<Object> args[] = {a, b};
|
| return Execution::Call(isolate, function, undefined(), 2, args, false);
|
|
|