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

Side by Side Diff: src/compiler.cc

Issue 2655223003: Revert of [tests] Make assertOptimized()/assertUnoptimized() great again. (Closed)
Patch Set: Created 3 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 | « no previous file | src/d8.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 info->shared_info()->set_feedback_metadata(*feedback_metadata); 306 info->shared_info()->set_feedback_metadata(*feedback_metadata);
307 } 307 }
308 308
309 // It's very important that recompiles do not alter the structure of the type 309 // It's very important that recompiles do not alter the structure of the type
310 // feedback vector. Verify that the structure fits the function literal. 310 // feedback vector. Verify that the structure fits the function literal.
311 CHECK(!info->shared_info()->feedback_metadata()->SpecDiffersFrom( 311 CHECK(!info->shared_info()->feedback_metadata()->SpecDiffersFrom(
312 info->literal()->feedback_vector_spec())); 312 info->literal()->feedback_vector_spec()));
313 } 313 }
314 314
315 bool UseTurboFan(Handle<SharedFunctionInfo> shared) { 315 bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
316 if (shared->optimization_disabled()) { 316 bool optimization_disabled = shared->optimization_disabled();
317 return false;
318 }
319
320 bool must_use_ignition_turbo = shared->must_use_ignition_turbo(); 317 bool must_use_ignition_turbo = shared->must_use_ignition_turbo();
321 318
322 // Check the enabling conditions for Turbofan. 319 // Check the enabling conditions for Turbofan.
323 // 1. "use asm" code. 320 // 1. "use asm" code.
324 bool is_turbofanable_asm = FLAG_turbo_asm && shared->asm_function(); 321 bool is_turbofanable_asm =
322 FLAG_turbo_asm && shared->asm_function() && !optimization_disabled;
325 323
326 // 2. Fallback for features unsupported by Crankshaft. 324 // 2. Fallback for features unsupported by Crankshaft.
327 bool is_unsupported_by_crankshaft_but_turbofanable = 325 bool is_unsupported_by_crankshaft_but_turbofanable =
328 must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0; 326 must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0 &&
327 !optimization_disabled;
329 328
330 // 3. Explicitly enabled by the command-line filter. 329 // 3. Explicitly enabled by the command-line filter.
331 bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter); 330 bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter);
332 331
333 return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable || 332 return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable ||
334 passes_turbo_filter; 333 passes_turbo_filter;
335 } 334 }
336 335
337 bool ShouldUseIgnition(CompilationInfo* info) { 336 bool ShouldUseIgnition(CompilationInfo* info) {
338 DCHECK(info->has_shared_info()); 337 DCHECK(info->has_shared_info());
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 DCHECK(shared->is_compiled()); 1763 DCHECK(shared->is_compiled());
1765 function->set_literals(cached.literals); 1764 function->set_literals(cached.literals);
1766 } else if (shared->is_compiled()) { 1765 } else if (shared->is_compiled()) {
1767 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1766 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1768 JSFunction::EnsureLiterals(function); 1767 JSFunction::EnsureLiterals(function);
1769 } 1768 }
1770 } 1769 }
1771 1770
1772 } // namespace internal 1771 } // namespace internal
1773 } // namespace v8 1772 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698