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

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

Issue 1075493003: Remove zapping of registers that has not turned up any GC bugs in a long time. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 const uword label_address = 1217 const uword label_address =
1218 stub_code->UnoptimizedStaticCallEntryPoint(ic_data.NumArgsTested()); 1218 stub_code->UnoptimizedStaticCallEntryPoint(ic_data.NumArgsTested());
1219 ExternalLabel target_label(label_address); 1219 ExternalLabel target_label(label_address);
1220 __ LoadObject(ECX, ic_data); 1220 __ LoadObject(ECX, ic_data);
1221 GenerateDartCall(deopt_id, 1221 GenerateDartCall(deopt_id,
1222 token_pos, 1222 token_pos,
1223 &target_label, 1223 &target_label,
1224 RawPcDescriptors::kUnoptStaticCall, 1224 RawPcDescriptors::kUnoptStaticCall,
1225 locs); 1225 locs);
1226 __ Drop(argument_count); 1226 __ Drop(argument_count);
1227 #if defined(DEBUG)
1228 __ movl(ECX, Immediate(kInvalidObjectPointer));
1229 __ movl(EDX, Immediate(kInvalidObjectPointer));
1230 #endif
1231 } 1227 }
1232 1228
1233 1229
1234 void FlowGraphCompiler::EmitEdgeCounter() { 1230 void FlowGraphCompiler::EmitEdgeCounter() {
1235 // We do not check for overflow when incrementing the edge counter. The 1231 // We do not check for overflow when incrementing the edge counter. The
1236 // function should normally be optimized long before the counter can 1232 // function should normally be optimized long before the counter can
1237 // overflow; and though we do not reset the counters when we optimize or 1233 // overflow; and though we do not reset the counters when we optimize or
1238 // deoptimize, there is a bound on the number of 1234 // deoptimize, there is a bound on the number of
1239 // optimization/deoptimization cycles we will attempt. 1235 // optimization/deoptimization cycles we will attempt.
1240 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); 1236 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld));
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 intptr_t token_pos, 1287 intptr_t token_pos,
1292 LocationSummary* locs) { 1288 LocationSummary* locs) {
1293 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); 1289 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0);
1294 __ LoadObject(ECX, ic_data); 1290 __ LoadObject(ECX, ic_data);
1295 GenerateDartCall(deopt_id, 1291 GenerateDartCall(deopt_id,
1296 token_pos, 1292 token_pos,
1297 target_label, 1293 target_label,
1298 RawPcDescriptors::kIcCall, 1294 RawPcDescriptors::kIcCall,
1299 locs); 1295 locs);
1300 __ Drop(argument_count); 1296 __ Drop(argument_count);
1301 #if defined(DEBUG)
1302 __ movl(EDX, Immediate(kInvalidObjectPointer));
1303 #endif
1304 } 1297 }
1305 1298
1306 1299
1307 void FlowGraphCompiler::EmitMegamorphicInstanceCall( 1300 void FlowGraphCompiler::EmitMegamorphicInstanceCall(
1308 const ICData& ic_data, 1301 const ICData& ic_data,
1309 intptr_t argument_count, 1302 intptr_t argument_count,
1310 intptr_t deopt_id, 1303 intptr_t deopt_id,
1311 intptr_t token_pos, 1304 intptr_t token_pos,
1312 LocationSummary* locs) { 1305 LocationSummary* locs) {
1313 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table(); 1306 MegamorphicCacheTable* table = Isolate::Current()->megamorphic_cache_table();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 if (is_optimizing()) { 1429 if (is_optimizing()) {
1437 __ call(&stub_code->OptimizedIdenticalWithNumberCheckLabel()); 1430 __ call(&stub_code->OptimizedIdenticalWithNumberCheckLabel());
1438 } else { 1431 } else {
1439 __ call(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); 1432 __ call(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel());
1440 } 1433 }
1441 if (token_pos != Scanner::kNoSourcePos) { 1434 if (token_pos != Scanner::kNoSourcePos) {
1442 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1435 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1443 Isolate::kNoDeoptId, 1436 Isolate::kNoDeoptId,
1444 token_pos); 1437 token_pos);
1445 } 1438 }
1446 #if defined(DEBUG)
1447 if (!is_optimizing()) {
1448 // Do this *after* adding the pc descriptor!
1449 __ movl(EDX, Immediate(kInvalidObjectPointer));
1450 __ movl(ECX, Immediate(kInvalidObjectPointer));
1451 }
1452 #endif
1453 // Stub returns result in flags (result of a cmpl, we need ZF computed). 1439 // Stub returns result in flags (result of a cmpl, we need ZF computed).
1454 __ popl(right); 1440 __ popl(right);
1455 __ popl(left); 1441 __ popl(left);
1456 } else { 1442 } else {
1457 __ cmpl(left, right); 1443 __ cmpl(left, right);
1458 } 1444 }
1459 return EQUAL; 1445 return EQUAL;
1460 } 1446 }
1461 1447
1462 1448
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 __ movups(reg, Address(ESP, 0)); 1835 __ movups(reg, Address(ESP, 0));
1850 __ addl(ESP, Immediate(kFpuRegisterSize)); 1836 __ addl(ESP, Immediate(kFpuRegisterSize));
1851 } 1837 }
1852 1838
1853 1839
1854 #undef __ 1840 #undef __
1855 1841
1856 } // namespace dart 1842 } // namespace dart
1857 1843
1858 #endif // defined TARGET_ARCH_IA32 1844 #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