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

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

Issue 806973002: Cleanup access to Instruction's fields (especially deopt_id_). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_range_analysis.h" 5 #include "vm/flow_graph_range_analysis.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/il_printer.h" 8 #include "vm/il_printer.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 return NULL; 951 return NULL;
952 } 952 }
953 953
954 void EmitTo(BlockEntryInstr* block, Instruction* instr) { 954 void EmitTo(BlockEntryInstr* block, Instruction* instr) {
955 GotoInstr* last = block->last_instruction()->AsGoto(); 955 GotoInstr* last = block->last_instruction()->AsGoto();
956 flow_graph_->InsertBefore(last, 956 flow_graph_->InsertBefore(last,
957 instr, 957 instr,
958 last->env(), 958 last->env(),
959 instr->IsDefinition() ? FlowGraph::kValue 959 instr->IsDefinition() ? FlowGraph::kValue
960 : FlowGraph::kEffect); 960 : FlowGraph::kEffect);
961 instr->deopt_id_ = last->GetDeoptId(); 961 instr->CopyDeoptIdFrom(*last);
962 instr->env()->set_deopt_id(instr->deopt_id_); 962 instr->env()->set_deopt_id(instr->deopt_id_);
963 963
964 map_.Insert(instr); 964 map_.Insert(instr);
965 emitted_.Add(instr); 965 emitted_.Add(instr);
966 } 966 }
967 967
968 FlowGraph* flow_graph_; 968 FlowGraph* flow_graph_;
969 Map map_; 969 Map map_;
970 const ZoneGrowableArray<BlockEntryInstr*>& loop_headers_; 970 const ZoneGrowableArray<BlockEntryInstr*>& loop_headers_;
971 GrowableArray<BlockEntryInstr*> pre_headers_; 971 GrowableArray<BlockEntryInstr*> pre_headers_;
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after
3141 } 3141 }
3142 } while (CanonicalizeMaxBoundary(&max) || 3142 } while (CanonicalizeMaxBoundary(&max) ||
3143 CanonicalizeMinBoundary(&canonical_length)); 3143 CanonicalizeMinBoundary(&canonical_length));
3144 3144
3145 // Failed to prove that maximum is bounded with array length. 3145 // Failed to prove that maximum is bounded with array length.
3146 return false; 3146 return false;
3147 } 3147 }
3148 3148
3149 3149
3150 } // namespace dart 3150 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698