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

Side by Side Diff: test/cctest/compiler/test-run-bytecode-graph-builder.cc

Issue 2645403002: [Compiler] Enable use of seperate zones for parsing and compiling. (Closed)
Patch Set: Add back header 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <utility> 5 #include <utility>
6 6
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/pipeline.h" 8 #include "src/compiler/pipeline.h"
9 #include "src/execution.h" 9 #include "src/execution.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 ->Get(CcTest::isolate()->GetCurrentContext(), v8_str(functionName)) 117 ->Get(CcTest::isolate()->GetCurrentContext(), v8_str(functionName))
118 .ToLocalChecked()); 118 .ToLocalChecked());
119 Handle<JSFunction> function = 119 Handle<JSFunction> function =
120 Handle<JSFunction>::cast(v8::Utils::OpenHandle(*api_function)); 120 Handle<JSFunction>::cast(v8::Utils::OpenHandle(*api_function));
121 CHECK(function->shared()->HasBytecodeArray()); 121 CHECK(function->shared()->HasBytecodeArray());
122 122
123 // TODO(mstarzinger): We should be able to prime CompilationInfo without 123 // TODO(mstarzinger): We should be able to prime CompilationInfo without
124 // having to instantiate a ParseInfo first. Fix this! 124 // having to instantiate a ParseInfo first. Fix this!
125 ParseInfo parse_info(handle(function->shared())); 125 ParseInfo parse_info(handle(function->shared()));
126 126
127 CompilationInfo compilation_info(&parse_info, function); 127 CompilationInfo compilation_info(parse_info.zone(), &parse_info, function);
128 compilation_info.SetOptimizing(); 128 compilation_info.SetOptimizing();
129 compilation_info.MarkAsDeoptimizationEnabled(); 129 compilation_info.MarkAsDeoptimizationEnabled();
130 compilation_info.MarkAsOptimizeFromBytecode(); 130 compilation_info.MarkAsOptimizeFromBytecode();
131 Handle<Code> code = Pipeline::GenerateCodeForTesting(&compilation_info); 131 Handle<Code> code = Pipeline::GenerateCodeForTesting(&compilation_info);
132 function->ReplaceCode(*code); 132 function->ReplaceCode(*code);
133 133
134 return function; 134 return function;
135 } 135 }
136 136
137 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester); 137 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester);
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after
2989 Handle<Object> return_value = callable().ToHandleChecked(); 2989 Handle<Object> return_value = callable().ToHandleChecked();
2990 2990
2991 v8::Debug::SetDebugEventListener(CcTest::isolate(), nullptr); 2991 v8::Debug::SetDebugEventListener(CcTest::isolate(), nullptr);
2992 CHECK(return_value.is_identical_to(snippet.return_value())); 2992 CHECK(return_value.is_identical_to(snippet.return_value()));
2993 CHECK_EQ(2, debug_break_count); 2993 CHECK_EQ(2, debug_break_count);
2994 } 2994 }
2995 2995
2996 } // namespace compiler 2996 } // namespace compiler
2997 } // namespace internal 2997 } // namespace internal
2998 } // namespace v8 2998 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698