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

Side by Side Diff: runtime/vm/precompiler.cc

Issue 1755353002: Fix precompiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/precompiler.h" 5 #include "vm/precompiler.h"
6 6
7 #include "vm/aot_optimizer.h" 7 #include "vm/aot_optimizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/branch_optimizer.h" 10 #include "vm/branch_optimizer.h"
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 // Collect all instance fields that are loaded in the graph and 2006 // Collect all instance fields that are loaded in the graph and
2007 // have non-generic type feedback attached to them that can 2007 // have non-generic type feedback attached to them that can
2008 // potentially affect optimizations. 2008 // potentially affect optimizations.
2009 if (optimized()) { 2009 if (optimized()) {
2010 #ifndef PRODUCT 2010 #ifndef PRODUCT
2011 TimelineDurationScope tds(thread(), 2011 TimelineDurationScope tds(thread(),
2012 compiler_timeline, 2012 compiler_timeline,
2013 "OptimizationPasses"); 2013 "OptimizationPasses");
2014 #endif // !PRODUCT 2014 #endif // !PRODUCT
2015 inline_id_to_function.Add(&function); 2015 inline_id_to_function.Add(&function);
2016 inline_id_to_token_pos.Add(function.token_pos()); 2016 // We do not add the token position now because we don't know the
2017 // position of the inlined call until later. A side effect of this
2018 // is that the length of |inline_id_to_function| is always larger
2019 // than the length of |inline_id_to_token_pos| by one.
2020 // Top scope function has no caller (-1). We do this because we expect
2021 // all token positions to be at an inlined call.
2017 // Top scope function has no caller (-1). 2022 // Top scope function has no caller (-1).
2018 caller_inline_id.Add(-1); 2023 caller_inline_id.Add(-1);
2019 CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer); 2024 CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer);
2020 2025
2021 AotOptimizer optimizer(flow_graph, 2026 AotOptimizer optimizer(flow_graph,
2022 use_speculative_inlining, 2027 use_speculative_inlining,
2023 &inlining_black_list); 2028 &inlining_black_list);
2024 optimizer.PopulateWithICData(); 2029 optimizer.PopulateWithICData();
2025 2030
2026 optimizer.ApplyClassIds(); 2031 optimizer.ApplyClassIds();
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 CompilationPipeline::New(thread->zone(), function); 2540 CompilationPipeline::New(thread->zone(), function);
2536 2541
2537 ASSERT(FLAG_precompiled_mode); 2542 ASSERT(FLAG_precompiled_mode);
2538 const bool optimized = function.IsOptimizable(); // False for natives. 2543 const bool optimized = function.IsOptimizable(); // False for natives.
2539 return PrecompileFunctionHelper(pipeline, function, optimized); 2544 return PrecompileFunctionHelper(pipeline, function, optimized);
2540 } 2545 }
2541 2546
2542 #endif // DART_PRECOMPILER 2547 #endif // DART_PRECOMPILER
2543 2548
2544 } // namespace dart 2549 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698