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

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

Issue 304703002: Split GuardField into GuardFieldType and GuardFieldLength instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 249 }
250 250
251 251
252 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { 252 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
253 if (!is_optimizing()) { 253 if (!is_optimizing()) {
254 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { 254 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) {
255 AssertAssignableInstr* assert = instr->AsAssertAssignable(); 255 AssertAssignableInstr* assert = instr->AsAssertAssignable();
256 AddCurrentDescriptor(PcDescriptors::kDeopt, 256 AddCurrentDescriptor(PcDescriptors::kDeopt,
257 assert->deopt_id(), 257 assert->deopt_id(),
258 assert->token_pos()); 258 assert->token_pos());
259 } else if (instr->IsGuardField() || 259 } else if (instr->CanBecomeDeoptimizationTarget() && !instr->IsGoto()) {
260 (instr->CanBecomeDeoptimizationTarget() && !instr->IsGoto())) { 260 // Instructions that can be deoptimization targets need to record kDeopt
261 // GuardField and instructions that can be deoptimization targets need 261 // PcDescriptor corresponding to their deopt id. GotoInstr records its
262 // to record their deopt id. GotoInstr records its own so that it can 262 // own so that it can control the placement.
263 // control the placement.
264 AddCurrentDescriptor(PcDescriptors::kDeopt, 263 AddCurrentDescriptor(PcDescriptors::kDeopt,
265 instr->deopt_id(), 264 instr->deopt_id(),
266 Scanner::kNoSourcePos); 265 Scanner::kNoSourcePos);
267 } 266 }
268 AllocateRegistersLocally(instr); 267 AllocateRegistersLocally(instr);
269 } else if (instr->MayThrow() && 268 } else if (instr->MayThrow() &&
270 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { 269 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) {
271 // Optimized try-block: Sync locals to fixed stack locations. 270 // Optimized try-block: Sync locals to fixed stack locations.
272 EmitTrySync(instr, CurrentTryIndex()); 271 EmitTrySync(instr, CurrentTryIndex());
273 } 272 }
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 1297
1299 for (int i = 0; i < len; i++) { 1298 for (int i = 0; i < len; i++) {
1300 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1299 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1301 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1300 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1302 ic_data.GetCountAt(i))); 1301 ic_data.GetCountAt(i)));
1303 } 1302 }
1304 sorted->Sort(HighestCountFirst); 1303 sorted->Sort(HighestCountFirst);
1305 } 1304 }
1306 1305
1307 } // namespace dart 1306 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698