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

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

Issue 15741002: Use a uniform way to emit code for all instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 } 563 }
564 564
565 565
566 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { 566 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
567 if (!is_optimizing()) { 567 if (!is_optimizing()) {
568 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { 568 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) {
569 AssertAssignableInstr* assert = instr->AsAssertAssignable(); 569 AssertAssignableInstr* assert = instr->AsAssertAssignable();
570 AddCurrentDescriptor(PcDescriptors::kDeopt, 570 AddCurrentDescriptor(PcDescriptors::kDeopt,
571 assert->deopt_id(), 571 assert->deopt_id(),
572 assert->token_pos()); 572 assert->token_pos());
573 } else if (instr->IsGuardField()) { 573 } else if (instr->CanBeDeoptimizationTarget() || instr->IsGuardField()) {
574 GuardFieldInstr* guard = instr->AsGuardField();
575 AddCurrentDescriptor(PcDescriptors::kDeopt,
576 guard->deopt_id(),
577 Scanner::kDummyTokenIndex);
578 } else if (instr->CanBeDeoptimizationTarget()) {
579 AddCurrentDescriptor(PcDescriptors::kDeopt, 574 AddCurrentDescriptor(PcDescriptors::kDeopt,
580 instr->deopt_id(), 575 instr->deopt_id(),
581 Scanner::kDummyTokenIndex); 576 Scanner::kDummyTokenIndex);
582 } 577 }
583 AllocateRegistersLocally(instr); 578 AllocateRegistersLocally(instr);
584 } 579 }
585 } 580 }
586 581
587 582
588 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) { 583 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) {
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 __ AddImmediate(SP, kDoubleSize); 1574 __ AddImmediate(SP, kDoubleSize);
1580 } 1575 }
1581 1576
1582 1577
1583 #undef __ 1578 #undef __
1584 1579
1585 1580
1586 } // namespace dart 1581 } // namespace dart
1587 1582
1588 #endif // defined TARGET_ARCH_MIPS 1583 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698