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

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

Issue 10668034: Recognize leaf functions: skip stack check and populating the pc slot, store the pc slot lazily in … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 if (value().IsSmi()) { 150 if (value().IsSmi()) {
151 int32_t imm = reinterpret_cast<int32_t>(value().raw()); 151 int32_t imm = reinterpret_cast<int32_t>(value().raw());
152 __ movl(result, Immediate(imm)); 152 __ movl(result, Immediate(imm));
153 } else { 153 } else {
154 __ LoadObject(result, value()); 154 __ LoadObject(result, value());
155 } 155 }
156 } 156 }
157 157
158 158
159 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { 159 LocationSummary* AssertAssignableComp::MakeLocationSummary() const {
160 LocationSummary* summary = new LocationSummary(3, 0); 160 const intptr_t kNumInputs = 3;
161 const intptr_t kNumTemps = 0;
162 LocationSummary* summary = new LocationSummary(kNumInputs,
163 kNumTemps,
164 LocationSummary::kCall);
161 summary->set_in(0, Location::RegisterLocation(EAX)); // Value. 165 summary->set_in(0, Location::RegisterLocation(EAX)); // Value.
162 summary->set_in(1, Location::RegisterLocation(ECX)); // Instantiator. 166 summary->set_in(1, Location::RegisterLocation(ECX)); // Instantiator.
163 summary->set_in(2, Location::RegisterLocation(EDX)); // Type arguments. 167 summary->set_in(2, Location::RegisterLocation(EDX)); // Type arguments.
164 summary->set_out(Location::RegisterLocation(EAX)); 168 summary->set_out(Location::RegisterLocation(EAX));
165 return summary; 169 return summary;
166 } 170 }
167 171
168 172
169 void AssertBooleanComp::EmitNativeCode(FlowGraphCompiler* compiler) { 173 void AssertBooleanComp::EmitNativeCode(FlowGraphCompiler* compiler) {
170 Register obj = locs()->in(0).reg(); 174 Register obj = locs()->in(0).reg();
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 972
969 973
970 void LoadStaticFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { 974 void LoadStaticFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) {
971 Register result = locs()->out().reg(); 975 Register result = locs()->out().reg();
972 __ LoadObject(result, field()); 976 __ LoadObject(result, field());
973 __ movl(result, FieldAddress(result, Field::value_offset())); 977 __ movl(result, FieldAddress(result, Field::value_offset()));
974 } 978 }
975 979
976 980
977 LocationSummary* InstanceOfComp::MakeLocationSummary() const { 981 LocationSummary* InstanceOfComp::MakeLocationSummary() const {
978 LocationSummary* summary = new LocationSummary(3, 0); 982 const intptr_t kNumInputs = 3;
983 const intptr_t kNumTemps = 0;
984 LocationSummary* summary = new LocationSummary(kNumInputs,
985 kNumTemps,
986 LocationSummary::kCall);
979 summary->set_in(0, Location::RegisterLocation(EAX)); 987 summary->set_in(0, Location::RegisterLocation(EAX));
980 summary->set_in(1, Location::RegisterLocation(ECX)); 988 summary->set_in(1, Location::RegisterLocation(ECX));
981 summary->set_in(2, Location::RegisterLocation(EDX)); 989 summary->set_in(2, Location::RegisterLocation(EDX));
982 summary->set_out(Location::RegisterLocation(EAX)); 990 summary->set_out(Location::RegisterLocation(EAX));
983 return summary; 991 return summary;
984 } 992 }
985 993
986 994
987 void InstanceOfComp::EmitNativeCode(FlowGraphCompiler* compiler) { 995 void InstanceOfComp::EmitNativeCode(FlowGraphCompiler* compiler) {
988 ASSERT(locs()->in(0).reg() == EAX); // Value. 996 ASSERT(locs()->in(0).reg() == EAX); // Value.
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 instance_call()->argument_names()); 1974 instance_call()->argument_names());
1967 } 1975 }
1968 __ Bind(&done); 1976 __ Bind(&done);
1969 } 1977 }
1970 1978
1971 } // namespace dart 1979 } // namespace dart
1972 1980
1973 #undef __ 1981 #undef __
1974 1982
1975 #endif // defined TARGET_ARCH_X64 1983 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698