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

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

Issue 2149023002: VM: Array bounds checks that don't deoptimize for precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 4 years, 5 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 | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/runtime_entry_list.h » ('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 (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 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2667 compiler_timeline, 2667 compiler_timeline,
2668 "AllocationSinking::DetachMaterializations"); 2668 "AllocationSinking::DetachMaterializations");
2669 #endif // !PRODUCT 2669 #endif // !PRODUCT
2670 // Remove all MaterializeObject instructions inserted by allocation 2670 // Remove all MaterializeObject instructions inserted by allocation
2671 // sinking from the flow graph and let them float on the side 2671 // sinking from the flow graph and let them float on the side
2672 // referenced only from environments. Register allocator will consider 2672 // referenced only from environments. Register allocator will consider
2673 // them as part of a deoptimization environment. 2673 // them as part of a deoptimization environment.
2674 sinking->DetachMaterializations(); 2674 sinking->DetachMaterializations();
2675 } 2675 }
2676 2676
2677 // Replace bounds check instruction with a generic one.
2678 optimizer.ReplaceArrayBoundChecks();
2679
2677 // Compute and store graph informations (call & instruction counts) 2680 // Compute and store graph informations (call & instruction counts)
2678 // to be later used by the inliner. 2681 // to be later used by the inliner.
2679 FlowGraphInliner::CollectGraphInfo(flow_graph, true); 2682 FlowGraphInliner::CollectGraphInfo(flow_graph, true);
2680 2683
2681 { 2684 {
2682 #ifndef PRODUCT 2685 #ifndef PRODUCT
2683 TimelineDurationScope tds2(thread(), 2686 TimelineDurationScope tds2(thread(),
2684 compiler_timeline, 2687 compiler_timeline,
2685 "AllocateRegisters"); 2688 "AllocateRegisters");
2686 #endif // !PRODUCT 2689 #endif // !PRODUCT
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2880 CompilationPipeline::New(thread->zone(), function); 2883 CompilationPipeline::New(thread->zone(), function);
2881 2884
2882 ASSERT(FLAG_precompiled_mode); 2885 ASSERT(FLAG_precompiled_mode);
2883 const bool optimized = function.IsOptimizable(); // False for natives. 2886 const bool optimized = function.IsOptimizable(); // False for natives.
2884 return PrecompileFunctionHelper(pipeline, function, optimized); 2887 return PrecompileFunctionHelper(pipeline, function, optimized);
2885 } 2888 }
2886 2889
2887 #endif // DART_PRECOMPILER 2890 #endif // DART_PRECOMPILER
2888 2891
2889 } // namespace dart 2892 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/runtime_entry_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698