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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 } 722 }
723 723
724 724
725 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { 725 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
726 if (!is_optimizing()) { 726 if (!is_optimizing()) {
727 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) { 727 if (FLAG_enable_type_checks && instr->IsAssertAssignable()) {
728 AssertAssignableInstr* assert = instr->AsAssertAssignable(); 728 AssertAssignableInstr* assert = instr->AsAssertAssignable();
729 AddCurrentDescriptor(PcDescriptors::kDeopt, 729 AddCurrentDescriptor(PcDescriptors::kDeopt,
730 assert->deopt_id(), 730 assert->deopt_id(),
731 assert->token_pos()); 731 assert->token_pos());
732 } else if (instr->IsGuardField()) { 732 } else if (instr->CanBeDeoptimizationTarget() || instr->IsGuardField()) {
733 GuardFieldInstr* guard = instr->AsGuardField();
734 AddCurrentDescriptor(PcDescriptors::kDeopt,
735 guard->deopt_id(),
736 Scanner::kDummyTokenIndex);
737 } else if (instr->CanBeDeoptimizationTarget()) {
738 AddCurrentDescriptor(PcDescriptors::kDeopt, 733 AddCurrentDescriptor(PcDescriptors::kDeopt,
739 instr->deopt_id(), 734 instr->deopt_id(),
740 Scanner::kDummyTokenIndex); 735 Scanner::kDummyTokenIndex);
741 } 736 }
742 AllocateRegistersLocally(instr); 737 AllocateRegistersLocally(instr);
743 } else if (instr->MayThrow() && 738 } else if (instr->MayThrow() &&
744 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) { 739 (CurrentTryIndex() != CatchClauseNode::kInvalidTryIndex)) {
745 // Optimized try-block: Sync locals to fixed stack locations. 740 // Optimized try-block: Sync locals to fixed stack locations.
746 EmitTrySync(instr, CurrentTryIndex()); 741 EmitTrySync(instr, CurrentTryIndex());
747 } 742 }
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 __ movups(reg, Address(ESP, 0)); 1947 __ movups(reg, Address(ESP, 0));
1953 __ addl(ESP, Immediate(kFpuRegisterSize)); 1948 __ addl(ESP, Immediate(kFpuRegisterSize));
1954 } 1949 }
1955 1950
1956 1951
1957 #undef __ 1952 #undef __
1958 1953
1959 } // namespace dart 1954 } // namespace dart
1960 1955
1961 #endif // defined TARGET_ARCH_IA32 1956 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698