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

Side by Side Diff: src/compiler.cc

Issue 2654733004: [tests] Make assertOptimized()/assertUnoptimized() great again. (Closed)
Patch Set: Rebasing for relanding 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
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | test/mjsunit/mjsunit.js » ('J')
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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 info->shared_info()->set_feedback_metadata(*feedback_metadata); 307 info->shared_info()->set_feedback_metadata(*feedback_metadata);
308 } 308 }
309 309
310 // It's very important that recompiles do not alter the structure of the type 310 // It's very important that recompiles do not alter the structure of the type
311 // feedback vector. Verify that the structure fits the function literal. 311 // feedback vector. Verify that the structure fits the function literal.
312 CHECK(!info->shared_info()->feedback_metadata()->SpecDiffersFrom( 312 CHECK(!info->shared_info()->feedback_metadata()->SpecDiffersFrom(
313 info->literal()->feedback_vector_spec())); 313 info->literal()->feedback_vector_spec()));
314 } 314 }
315 315
316 bool UseTurboFan(Handle<SharedFunctionInfo> shared) { 316 bool UseTurboFan(Handle<SharedFunctionInfo> shared) {
317 bool optimization_disabled = shared->optimization_disabled(); 317 if (shared->optimization_disabled()) {
318 return false;
319 }
320
318 bool must_use_ignition_turbo = shared->must_use_ignition_turbo(); 321 bool must_use_ignition_turbo = shared->must_use_ignition_turbo();
319 322
320 // Check the enabling conditions for Turbofan. 323 // Check the enabling conditions for Turbofan.
321 // 1. "use asm" code. 324 // 1. "use asm" code.
322 bool is_turbofanable_asm = 325 bool is_turbofanable_asm = FLAG_turbo_asm && shared->asm_function();
323 FLAG_turbo_asm && shared->asm_function() && !optimization_disabled;
324 326
325 // 2. Fallback for features unsupported by Crankshaft. 327 // 2. Fallback for features unsupported by Crankshaft.
326 bool is_unsupported_by_crankshaft_but_turbofanable = 328 bool is_unsupported_by_crankshaft_but_turbofanable =
327 must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0 && 329 must_use_ignition_turbo && strcmp(FLAG_turbo_filter, "~~") == 0;
328 !optimization_disabled;
329 330
330 // 3. Explicitly enabled by the command-line filter. 331 // 3. Explicitly enabled by the command-line filter.
331 bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter); 332 bool passes_turbo_filter = shared->PassesFilter(FLAG_turbo_filter);
332 333
333 return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable || 334 return is_turbofanable_asm || is_unsupported_by_crankshaft_but_turbofanable ||
334 passes_turbo_filter; 335 passes_turbo_filter;
335 } 336 }
336 337
337 bool ShouldUseIgnition(CompilationInfo* info) { 338 bool ShouldUseIgnition(CompilationInfo* info) {
338 DCHECK(info->has_shared_info()); 339 DCHECK(info->has_shared_info());
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 DCHECK(shared->is_compiled()); 1801 DCHECK(shared->is_compiled());
1801 function->set_literals(cached.literals); 1802 function->set_literals(cached.literals);
1802 } else if (shared->is_compiled()) { 1803 } else if (shared->is_compiled()) {
1803 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1804 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1804 JSFunction::EnsureLiterals(function); 1805 JSFunction::EnsureLiterals(function);
1805 } 1806 }
1806 } 1807 }
1807 1808
1808 } // namespace internal 1809 } // namespace internal
1809 } // namespace v8 1810 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | test/mjsunit/mjsunit.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698