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_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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| 11 #include "vm/flow_graph.h" | |
| 11 #include "vm/flow_graph_compiler.h" | 12 #include "vm/flow_graph_compiler.h" |
| 12 #include "vm/locations.h" | 13 #include "vm/locations.h" |
| 13 #include "vm/object_store.h" | 14 #include "vm/object_store.h" |
| 14 #include "vm/parser.h" | 15 #include "vm/parser.h" |
| 15 #include "vm/stack_frame.h" | 16 #include "vm/stack_frame.h" |
| 16 #include "vm/stub_code.h" | 17 #include "vm/stub_code.h" |
| 17 #include "vm/symbols.h" | 18 #include "vm/symbols.h" |
| 18 | 19 |
| 19 #define __ compiler->assembler()-> | 20 #define __ compiler->assembler()-> |
| 20 | 21 |
| (...skipping 5970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5991 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5992 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5992 if (!compiler->CanFallThroughTo(normal_entry())) { | 5993 if (!compiler->CanFallThroughTo(normal_entry())) { |
| 5993 __ jmp(compiler->GetJumpLabel(normal_entry())); | 5994 __ jmp(compiler->GetJumpLabel(normal_entry())); |
| 5994 } | 5995 } |
| 5995 } | 5996 } |
| 5996 | 5997 |
| 5997 | 5998 |
| 5998 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5999 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5999 __ Bind(compiler->GetJumpLabel(this)); | 6000 __ Bind(compiler->GetJumpLabel(this)); |
| 6000 if (!compiler->is_optimizing()) { | 6001 if (!compiler->is_optimizing()) { |
| 6001 if (FLAG_emit_edge_counters) { | 6002 if (FLAG_emit_edge_counters && |
| 6003 (!last_instruction()->IsGoto() || | |
| 6004 (this == compiler->flow_graph().graph_entry()->normal_entry()))) { | |
|
srdjan
2014/06/06 14:59:51
How about factoring this test into TargetInstr::Ne
Florian Schneider
2014/06/10 08:56:39
Moved to FlowGraphCompiler::NeedEdgeCounter(Target
| |
| 6002 compiler->EmitEdgeCounter(); | 6005 compiler->EmitEdgeCounter(); |
| 6003 } | 6006 } |
| 6004 // The deoptimization descriptor points after the edge counter code for | 6007 // The deoptimization descriptor points after the edge counter code for |
| 6005 // uniformity with ARM and MIPS, where we can reuse pattern matching | 6008 // uniformity with ARM and MIPS, where we can reuse pattern matching |
| 6006 // code that matches backwards from the end of the pattern. | 6009 // code that matches backwards from the end of the pattern. |
| 6007 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 6010 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 6008 deopt_id_, | 6011 deopt_id_, |
| 6009 Scanner::kNoSourcePos); | 6012 Scanner::kNoSourcePos); |
| 6010 } | 6013 } |
| 6011 if (HasParallelMove()) { | 6014 if (HasParallelMove()) { |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6291 PcDescriptors::kOther, | 6294 PcDescriptors::kOther, |
| 6292 locs()); | 6295 locs()); |
| 6293 __ Drop(ArgumentCount()); // Discard arguments. | 6296 __ Drop(ArgumentCount()); // Discard arguments. |
| 6294 } | 6297 } |
| 6295 | 6298 |
| 6296 } // namespace dart | 6299 } // namespace dart |
| 6297 | 6300 |
| 6298 #undef __ | 6301 #undef __ |
| 6299 | 6302 |
| 6300 #endif // defined TARGET_ARCH_IA32 | 6303 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |