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

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

Issue 731943004: Box values of LoadCodeUnits that fall outside of smi range on 32bit platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: might_box Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/intermediate_language.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4600 matching lines...) Expand 10 before | Expand all | Expand 10 after
4611 new Value(flow_graph_->constant_null()), 4611 new Value(flow_graph_->constant_null()),
4612 kNoStoreBarrier, 4612 kNoStoreBarrier,
4613 instr->token_pos()); 4613 instr->token_pos());
4614 store->set_is_initialization(true); // Won't be eliminated by DSE. 4614 store->set_is_initialization(true); // Won't be eliminated by DSE.
4615 flow_graph_->InsertAfter(cursor, store, NULL, FlowGraph::kEffect); 4615 flow_graph_->InsertAfter(cursor, store, NULL, FlowGraph::kEffect);
4616 cursor = store; 4616 cursor = store;
4617 } 4617 }
4618 } 4618 }
4619 4619
4620 4620
4621 void FlowGraphOptimizer::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
4622 // TODO(zerny): Use kUnboxedUint32 once it is fully supported/optimized.
4623 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
4624 if (!instr->can_pack_into_smi())
4625 instr->set_representation(kUnboxedMint);
4626 #endif
4627 }
4628
4629
4621 bool FlowGraphOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr, 4630 bool FlowGraphOptimizer::TryInlineInstanceSetter(InstanceCallInstr* instr,
4622 const ICData& unary_ic_data) { 4631 const ICData& unary_ic_data) {
4623 ASSERT((unary_ic_data.NumberOfChecks() > 0) && 4632 ASSERT((unary_ic_data.NumberOfChecks() > 0) &&
4624 (unary_ic_data.NumArgsTested() == 1)); 4633 (unary_ic_data.NumArgsTested() == 1));
4625 if (FLAG_enable_type_checks) { 4634 if (FLAG_enable_type_checks) {
4626 // Checked mode setters are inlined like normal methods by conventional 4635 // Checked mode setters are inlined like normal methods by conventional
4627 // inlining. 4636 // inlining.
4628 return false; 4637 return false;
4629 } 4638 }
4630 4639
(...skipping 5409 matching lines...) Expand 10 before | Expand all | Expand 10 after
10040 10049
10041 // Insert materializations at environment uses. 10050 // Insert materializations at environment uses.
10042 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 10051 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
10043 CreateMaterializationAt( 10052 CreateMaterializationAt(
10044 exits_collector_.exits()[i], alloc, *slots); 10053 exits_collector_.exits()[i], alloc, *slots);
10045 } 10054 }
10046 } 10055 }
10047 10056
10048 10057
10049 } // namespace dart 10058 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698