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

Side by Side Diff: test/cctest/compiler/function-tester.h

Issue 1632993003: Revert of Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/cctest.status ('k') | test/cctest/compiler/test-run-jscalls.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
7 7
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 info.MarkAsFunctionContextSpecializing(); 175 info.MarkAsFunctionContextSpecializing();
176 } 176 }
177 if (flags_ & CompilationInfo::kInliningEnabled) { 177 if (flags_ & CompilationInfo::kInliningEnabled) {
178 info.MarkAsInliningEnabled(); 178 info.MarkAsInliningEnabled();
179 } 179 }
180 if (flags_ & CompilationInfo::kTypingEnabled) { 180 if (flags_ & CompilationInfo::kTypingEnabled) {
181 info.MarkAsTypingEnabled(); 181 info.MarkAsTypingEnabled();
182 } 182 }
183 CHECK(Compiler::Analyze(info.parse_info())); 183 CHECK(Compiler::Analyze(info.parse_info()));
184 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 184 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
185 JSFunction::EnsureLiterals(function);
186 185
187 Pipeline pipeline(&info); 186 Pipeline pipeline(&info);
188 Handle<Code> code = pipeline.GenerateCode(); 187 Handle<Code> code = pipeline.GenerateCode();
189 CHECK(!code.is_null()); 188 CHECK(!code.is_null());
190 info.dependencies()->Commit(code); 189 info.dependencies()->Commit(code);
191 info.context()->native_context()->AddOptimizedCode(*code); 190 info.context()->native_context()->AddOptimizedCode(*code);
192 function->ReplaceCode(*code); 191 function->ReplaceCode(*code);
193 return function; 192 return function;
194 } 193 }
195 194
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 Handle<JSFunction> CompileGraph(Graph* graph) { 228 Handle<JSFunction> CompileGraph(Graph* graph) {
230 Zone zone; 229 Zone zone;
231 ParseInfo parse_info(&zone, function); 230 ParseInfo parse_info(&zone, function);
232 CompilationInfo info(&parse_info); 231 CompilationInfo info(&parse_info);
233 232
234 CHECK(Parser::ParseStatic(info.parse_info())); 233 CHECK(Parser::ParseStatic(info.parse_info()));
235 info.SetOptimizing(BailoutId::None(), 234 info.SetOptimizing(BailoutId::None(),
236 Handle<Code>(function->shared()->code())); 235 Handle<Code>(function->shared()->code()));
237 CHECK(Compiler::Analyze(info.parse_info())); 236 CHECK(Compiler::Analyze(info.parse_info()));
238 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 237 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
239 JSFunction::EnsureLiterals(function);
240 238
241 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph); 239 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph);
242 CHECK(!code.is_null()); 240 CHECK(!code.is_null());
243 function->ReplaceCode(*code); 241 function->ReplaceCode(*code);
244 return function; 242 return function;
245 } 243 }
246 }; 244 };
247 } // namespace compiler 245 } // namespace compiler
248 } // namespace internal 246 } // namespace internal
249 } // namespace v8 247 } // namespace v8
250 248
251 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 249 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/compiler/test-run-jscalls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698