Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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->IsGuardFieldClass() || |
| 260 instr->IsGuardFieldLength() || | |
|
Florian Schneider
2014/05/28 14:57:36
Can we just change CanBecomeDeoptimizationTarget()
Vyacheslav Egorov (Google)
2014/05/29 17:36:51
Done.
| |
| 260 (instr->CanBecomeDeoptimizationTarget() && !instr->IsGoto())) { | 261 (instr->CanBecomeDeoptimizationTarget() && !instr->IsGoto())) { |
| 261 // GuardField and instructions that can be deoptimization targets need | 262 // GuardField and instructions that can be deoptimization targets need |
| 262 // to record their deopt id. GotoInstr records its own so that it can | 263 // to record their deopt id. GotoInstr records its own so that it can |
| 263 // control the placement. | 264 // control the placement. |
| 264 AddCurrentDescriptor(PcDescriptors::kDeopt, | 265 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 265 instr->deopt_id(), | 266 instr->deopt_id(), |
| 266 Scanner::kNoSourcePos); | 267 Scanner::kNoSourcePos); |
| 267 } | 268 } |
| 268 AllocateRegistersLocally(instr); | 269 AllocateRegistersLocally(instr); |
| 269 } else if (instr->MayThrow() && | 270 } else if (instr->MayThrow() && |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1298 | 1299 |
| 1299 for (int i = 0; i < len; i++) { | 1300 for (int i = 0; i < len; i++) { |
| 1300 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1301 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1301 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1302 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1302 ic_data.GetCountAt(i))); | 1303 ic_data.GetCountAt(i))); |
| 1303 } | 1304 } |
| 1304 sorted->Sort(HighestCountFirst); | 1305 sorted->Sort(HighestCountFirst); |
| 1305 } | 1306 } |
| 1306 | 1307 |
| 1307 } // namespace dart | 1308 } // namespace dart |
| OLD | NEW |