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

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

Issue 11791051: Support immediate and memory operands for PushArgumentInstr in optimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: really handle constant operands Created 7 years, 11 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
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 // Allocate all unallocated input locations. 794 // Allocate all unallocated input locations.
795 const bool should_pop = !instr->IsPushArgument(); 795 const bool should_pop = !instr->IsPushArgument();
796 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) { 796 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) {
797 Location loc = locs->in(i); 797 Location loc = locs->in(i);
798 Register reg = kNoRegister; 798 Register reg = kNoRegister;
799 if (loc.IsRegister()) { 799 if (loc.IsRegister()) {
800 reg = loc.reg(); 800 reg = loc.reg();
801 } else if (loc.IsUnallocated() || loc.IsConstant()) { 801 } else if (loc.IsUnallocated() || loc.IsConstant()) {
802 ASSERT(loc.IsConstant() || 802 ASSERT(loc.IsConstant() ||
803 ((loc.policy() == Location::kRequiresRegister) || 803 ((loc.policy() == Location::kRequiresRegister) ||
804 (loc.policy() == Location::kWritableRegister))); 804 (loc.policy() == Location::kWritableRegister) ||
805 (loc.policy() == Location::kAny)));
805 reg = AllocateFreeRegister(blocked_registers); 806 reg = AllocateFreeRegister(blocked_registers);
806 locs->set_in(i, Location::RegisterLocation(reg)); 807 locs->set_in(i, Location::RegisterLocation(reg));
807 } 808 }
808 ASSERT(reg != kNoRegister); 809 ASSERT(reg != kNoRegister);
809 810
810 // Inputs are consumed from the simulated frame. In case of a call argument 811 // Inputs are consumed from the simulated frame. In case of a call argument
811 // we leave it until the call instruction. 812 // we leave it until the call instruction.
812 if (should_pop) { 813 if (should_pop) {
813 assembler()->PopRegister(reg); 814 assembler()->PopRegister(reg);
814 } 815 }
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 const AbstractTypeArguments& type_arguments = 1081 const AbstractTypeArguments& type_arguments =
1081 AbstractTypeArguments::Handle(type.arguments()); 1082 AbstractTypeArguments::Handle(type.arguments());
1082 const bool is_raw_type = type_arguments.IsNull() || 1083 const bool is_raw_type = type_arguments.IsNull() ||
1083 type_arguments.IsRaw(type_arguments.Length()); 1084 type_arguments.IsRaw(type_arguments.Length());
1084 return is_raw_type; 1085 return is_raw_type;
1085 } 1086 }
1086 return true; 1087 return true;
1087 } 1088 }
1088 1089
1089 } // namespace dart 1090 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698