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

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

Issue 10908091: Remove classes Computation and BindInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 597 }
598 598
599 599
600 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { 600 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
601 if (!is_optimizing()) { 601 if (!is_optimizing()) {
602 AllocateRegistersLocally(instr); 602 AllocateRegistersLocally(instr);
603 } 603 }
604 } 604 }
605 605
606 606
607 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) {
608 if (is_optimizing()) return;
609 Definition* defn = instr->AsDefinition();
610 if ((defn != NULL) && defn->is_used()) {
611 __ pushl(defn->locs()->out().reg());
612 }
613 }
614
615
607 void FlowGraphCompiler::CopyParameters() { 616 void FlowGraphCompiler::CopyParameters() {
608 __ Comment("Copy parameters"); 617 __ Comment("Copy parameters");
609 const Function& function = parsed_function().function(); 618 const Function& function = parsed_function().function();
610 const bool is_native_instance_closure = 619 const bool is_native_instance_closure =
611 function.is_native() && function.IsImplicitInstanceClosureFunction(); 620 function.is_native() && function.IsImplicitInstanceClosureFunction();
612 LocalScope* scope = parsed_function().node_sequence()->scope(); 621 LocalScope* scope = parsed_function().node_sequence()->scope();
613 const int num_fixed_params = function.num_fixed_parameters(); 622 const int num_fixed_params = function.num_fixed_parameters();
614 const int num_opt_params = function.num_optional_parameters(); 623 const int num_opt_params = function.num_optional_parameters();
615 int implicit_this_param_pos = is_native_instance_closure ? -1 : 0; 624 int implicit_this_param_pos = is_native_instance_closure ? -1 : 0;
616 ASSERT(parsed_function().first_parameter_index() == 625 ASSERT(parsed_function().first_parameter_index() ==
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 __ popl(ECX); 1323 __ popl(ECX);
1315 __ popl(EAX); 1324 __ popl(EAX);
1316 } 1325 }
1317 1326
1318 1327
1319 #undef __ 1328 #undef __
1320 1329
1321 } // namespace dart 1330 } // namespace dart
1322 1331
1323 #endif // defined TARGET_ARCH_IA32 1332 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698