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

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

Issue 339183010: Specialize breakpoint stubs by set of live registers of the stubs they are intercepting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.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_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 "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 uword label_address = 0; 1181 uword label_address = 0;
1182 StubCode* stub_code = isolate()->stub_code(); 1182 StubCode* stub_code = isolate()->stub_code();
1183 if (ic_data.NumArgsTested() == 0) { 1183 if (ic_data.NumArgsTested() == 0) {
1184 label_address = stub_code->ZeroArgsUnoptimizedStaticCallEntryPoint(); 1184 label_address = stub_code->ZeroArgsUnoptimizedStaticCallEntryPoint();
1185 } else if (ic_data.NumArgsTested() == 2) { 1185 } else if (ic_data.NumArgsTested() == 2) {
1186 label_address = stub_code->TwoArgsUnoptimizedStaticCallEntryPoint(); 1186 label_address = stub_code->TwoArgsUnoptimizedStaticCallEntryPoint();
1187 } else { 1187 } else {
1188 UNIMPLEMENTED(); 1188 UNIMPLEMENTED();
1189 } 1189 }
1190 ExternalLabel target_label(label_address); 1190 ExternalLabel target_label(label_address);
1191 __ movl(EDX, Immediate(0));
1192 __ LoadObject(ECX, ic_data); 1191 __ LoadObject(ECX, ic_data);
1193 GenerateDartCall(deopt_id, 1192 GenerateDartCall(deopt_id,
1194 token_pos, 1193 token_pos,
1195 &target_label, 1194 &target_label,
1196 RawPcDescriptors::kUnoptStaticCall, 1195 RawPcDescriptors::kUnoptStaticCall,
1197 locs); 1196 locs);
1198 __ Drop(argument_count); 1197 __ Drop(argument_count);
1199 #if defined(DEBUG) 1198 #if defined(DEBUG)
1199 __ movl(ECX, Immediate(kInvalidObjectPointer));
1200 __ movl(EDX, Immediate(kInvalidObjectPointer)); 1200 __ movl(EDX, Immediate(kInvalidObjectPointer));
1201 #endif 1201 #endif
1202 } 1202 }
1203 1203
1204 1204
1205 void FlowGraphCompiler::EmitEdgeCounter() { 1205 void FlowGraphCompiler::EmitEdgeCounter() {
1206 // We do not check for overflow when incrementing the edge counter. The 1206 // We do not check for overflow when incrementing the edge counter. The
1207 // function should normally be optimized long before the counter can 1207 // function should normally be optimized long before the counter can
1208 // overflow; and though we do not reset the counters when we optimize or 1208 // overflow; and though we do not reset the counters when we optimize or
1209 // deoptimize, there is a bound on the number of 1209 // deoptimize, there is a bound on the number of
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 } 1242 }
1243 1243
1244 1244
1245 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, 1245 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
1246 const ICData& ic_data, 1246 const ICData& ic_data,
1247 intptr_t argument_count, 1247 intptr_t argument_count,
1248 intptr_t deopt_id, 1248 intptr_t deopt_id,
1249 intptr_t token_pos, 1249 intptr_t token_pos,
1250 LocationSummary* locs) { 1250 LocationSummary* locs) {
1251 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); 1251 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0);
1252 __ movl(EDX, Immediate(0));
1253 __ LoadObject(ECX, ic_data); 1252 __ LoadObject(ECX, ic_data);
1254 GenerateDartCall(deopt_id, 1253 GenerateDartCall(deopt_id,
1255 token_pos, 1254 token_pos,
1256 target_label, 1255 target_label,
1257 RawPcDescriptors::kIcCall, 1256 RawPcDescriptors::kIcCall,
1258 locs); 1257 locs);
1259 __ Drop(argument_count); 1258 __ Drop(argument_count);
1260 #if defined(DEBUG) 1259 #if defined(DEBUG)
1261 __ movl(EDX, Immediate(kInvalidObjectPointer)); 1260 __ movl(EDX, Immediate(kInvalidObjectPointer));
1262 #endif 1261 #endif
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 Register right, 1385 Register right,
1387 bool needs_number_check, 1386 bool needs_number_check,
1388 intptr_t token_pos) { 1387 intptr_t token_pos) {
1389 if (needs_number_check) { 1388 if (needs_number_check) {
1390 StubCode* stub_code = isolate()->stub_code(); 1389 StubCode* stub_code = isolate()->stub_code();
1391 __ pushl(left); 1390 __ pushl(left);
1392 __ pushl(right); 1391 __ pushl(right);
1393 if (is_optimizing()) { 1392 if (is_optimizing()) {
1394 __ call(&stub_code->OptimizedIdenticalWithNumberCheckLabel()); 1393 __ call(&stub_code->OptimizedIdenticalWithNumberCheckLabel());
1395 } else { 1394 } else {
1396 __ movl(EDX, Immediate(0));
1397 __ movl(ECX, Immediate(0));
1398 __ call(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); 1395 __ call(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel());
1399 } 1396 }
1400 if (token_pos != Scanner::kNoSourcePos) { 1397 if (token_pos != Scanner::kNoSourcePos) {
1401 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1398 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1402 Isolate::kNoDeoptId, 1399 Isolate::kNoDeoptId,
1403 token_pos); 1400 token_pos);
1404 } 1401 }
1405 #if defined(DEBUG) 1402 #if defined(DEBUG)
1406 if (!is_optimizing()) { 1403 if (!is_optimizing()) {
1407 // Do this *after* adding the pc descriptor! 1404 // Do this *after* adding the pc descriptor!
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 __ movups(reg, Address(ESP, 0)); 1765 __ movups(reg, Address(ESP, 0));
1769 __ addl(ESP, Immediate(kFpuRegisterSize)); 1766 __ addl(ESP, Immediate(kFpuRegisterSize));
1770 } 1767 }
1771 1768
1772 1769
1773 #undef __ 1770 #undef __
1774 1771
1775 } // namespace dart 1772 } // namespace dart
1776 1773
1777 #endif // defined TARGET_ARCH_IA32 1774 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698