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

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

Issue 14942010: Eliminate temporary locals for some expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_optimizer.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) 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_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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 731
732 // Block all non-free registers. 732 // Block all non-free registers.
733 for (intptr_t i = 0; i < kFirstFreeCpuRegister; i++) { 733 for (intptr_t i = 0; i < kFirstFreeCpuRegister; i++) {
734 blocked_registers[i] = true; 734 blocked_registers[i] = true;
735 } 735 }
736 for (intptr_t i = kLastFreeCpuRegister + 1; i < kNumberOfCpuRegisters; i++) { 736 for (intptr_t i = kLastFreeCpuRegister + 1; i < kNumberOfCpuRegisters; i++) {
737 blocked_registers[i] = true; 737 blocked_registers[i] = true;
738 } 738 }
739 739
740 // Allocate all unallocated input locations. 740 // Allocate all unallocated input locations.
741 const bool should_pop = !instr->IsPushArgument(); 741 const bool should_pop = !instr->IsPushArgument() && !instr->IsPushTemp();
742 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) { 742 for (intptr_t i = locs->input_count() - 1; i >= 0; i--) {
743 Location loc = locs->in(i); 743 Location loc = locs->in(i);
744 Register reg = kNoRegister; 744 Register reg = kNoRegister;
745 if (loc.IsRegister()) { 745 if (loc.IsRegister()) {
746 reg = loc.reg(); 746 reg = loc.reg();
747 } else if (loc.IsUnallocated() || loc.IsConstant()) { 747 } else if (loc.IsUnallocated() || loc.IsConstant()) {
748 ASSERT(loc.IsConstant() || 748 ASSERT(loc.IsConstant() ||
749 ((loc.policy() == Location::kRequiresRegister) || 749 ((loc.policy() == Location::kRequiresRegister) ||
750 (loc.policy() == Location::kWritableRegister) || 750 (loc.policy() == Location::kWritableRegister) ||
751 (loc.policy() == Location::kAny))); 751 (loc.policy() == Location::kAny)));
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 1081
1082 for (int i = 0; i < len; i++) { 1082 for (int i = 0; i < len; i++) {
1083 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1083 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1084 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1084 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1085 ic_data.GetCountAt(i))); 1085 ic_data.GetCountAt(i)));
1086 } 1086 }
1087 sorted->Sort(HighestCountFirst); 1087 sorted->Sort(HighestCountFirst);
1088 } 1088 }
1089 1089
1090 } // namespace dart 1090 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698