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

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

Issue 1863083002: [parser] Remove ParseInfo::closure field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-internal-9
Patch Set: Rebased. Created 4 years, 8 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
« no previous file with comments | « test/cctest/compiler/test-pipeline.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler/pipeline.h" 7 #include "src/compiler/pipeline.h"
8 #include "src/execution.h" 8 #include "src/execution.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/interpreter/bytecode-array-builder.h" 10 #include "src/interpreter/bytecode-array-builder.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 ->Get(CcTest::isolate()->GetCurrentContext(), v8_str(functionName)) 118 ->Get(CcTest::isolate()->GetCurrentContext(), v8_str(functionName))
119 .ToLocalChecked()); 119 .ToLocalChecked());
120 Handle<JSFunction> function = 120 Handle<JSFunction> function =
121 Handle<JSFunction>::cast(v8::Utils::OpenHandle(*api_function)); 121 Handle<JSFunction>::cast(v8::Utils::OpenHandle(*api_function));
122 CHECK(function->shared()->HasBytecodeArray()); 122 CHECK(function->shared()->HasBytecodeArray());
123 123
124 // TODO(mstarzinger): We should be able to prime CompilationInfo without 124 // TODO(mstarzinger): We should be able to prime CompilationInfo without
125 // having to instantiate a ParseInfo first. Fix this! 125 // having to instantiate a ParseInfo first. Fix this!
126 ParseInfo parse_info(zone_, function); 126 ParseInfo parse_info(zone_, function);
127 127
128 CompilationInfo compilation_info(&parse_info); 128 CompilationInfo compilation_info(&parse_info, function);
129 compilation_info.SetOptimizing(); 129 compilation_info.SetOptimizing();
130 compilation_info.MarkAsDeoptimizationEnabled(); 130 compilation_info.MarkAsDeoptimizationEnabled();
131 compiler::Pipeline pipeline(&compilation_info); 131 compiler::Pipeline pipeline(&compilation_info);
132 Handle<Code> code = pipeline.GenerateCode(); 132 Handle<Code> code = pipeline.GenerateCode();
133 function->ReplaceCode(*code); 133 function->ReplaceCode(*code);
134 134
135 return function; 135 return function;
136 } 136 }
137 137
138 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester); 138 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester);
(...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2931 2931
2932 BytecodeGraphTester tester(isolate, zone, script.start()); 2932 BytecodeGraphTester tester(isolate, zone, script.start());
2933 auto callable = tester.GetCallable<>(); 2933 auto callable = tester.GetCallable<>();
2934 Handle<Object> return_value = callable().ToHandleChecked(); 2934 Handle<Object> return_value = callable().ToHandleChecked();
2935 CHECK(return_value->SameValue(*snippet.return_value())); 2935 CHECK(return_value->SameValue(*snippet.return_value()));
2936 } 2936 }
2937 2937
2938 } // namespace compiler 2938 } // namespace compiler
2939 } // namespace internal 2939 } // namespace internal
2940 } // namespace v8 2940 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-pipeline.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698