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

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

Issue 8665008: Fix crash reported by Florian. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/opt_code_generator.h" 8 #include "vm/opt_code_generator.h"
9 9
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 const ICData& ic_data = node->ICDataAtId(id); 1317 const ICData& ic_data = node->ICDataAtId(id);
1318 Function& target = Function::Handle(); 1318 Function& target = Function::Handle();
1319 Label load_field; 1319 Label load_field;
1320 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { 1320 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
1321 Class& cls = Class::ZoneHandle(); 1321 Class& cls = Class::ZoneHandle();
1322 ic_data.GetOneClassCheckAt(i, &cls, &target); 1322 ic_data.GetOneClassCheckAt(i, &cls, &target);
1323 __ CompareObject(EAX, cls); 1323 __ CompareObject(EAX, cls);
1324 if (i == (ic_data.NumberOfChecks() - 1)) { 1324 if (i == (ic_data.NumberOfChecks() - 1)) {
1325 __ j(NOT_EQUAL, deopt_blob->label()); 1325 __ j(NOT_EQUAL, deopt_blob->label());
1326 } else { 1326 } else {
1327 __ j(EQUAL, &load_field, Assembler::kNearJump); 1327 __ j(EQUAL, &load_field);
1328 } 1328 }
1329 } 1329 }
1330 Class& cls = Class::Handle(); 1330 Class& cls = Class::Handle();
1331 ic_data.GetOneClassCheckAt(0, &cls, &target); 1331 ic_data.GetOneClassCheckAt(0, &cls, &target);
1332 1332
1333 __ Bind(&load_field); 1333 __ Bind(&load_field);
1334 // EBX: receiver. 1334 // EBX: receiver.
1335 if (target.kind() == RawFunction::kImplicitGetter) { 1335 if (target.kind() == RawFunction::kImplicitGetter) {
1336 TraceOpt(node, "Inlines instance getter with same target"); 1336 TraceOpt(node, "Inlines instance getter with same target");
1337 intptr_t field_offset = GetFieldOffset(cls, field_name); 1337 intptr_t field_offset = GetFieldOffset(cls, field_name);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 const ICData& ic_data = node->ICDataAtId(id); 1486 const ICData& ic_data = node->ICDataAtId(id);
1487 Function& target = Function::Handle(); 1487 Function& target = Function::Handle();
1488 Label store_field; 1488 Label store_field;
1489 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { 1489 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
1490 Class& cls = Class::ZoneHandle(); 1490 Class& cls = Class::ZoneHandle();
1491 ic_data.GetOneClassCheckAt(i, &cls, &target); 1491 ic_data.GetOneClassCheckAt(i, &cls, &target);
1492 __ CompareObject(EBX, cls); 1492 __ CompareObject(EBX, cls);
1493 if (i == (ic_data.NumberOfChecks() - 1)) { 1493 if (i == (ic_data.NumberOfChecks() - 1)) {
1494 __ j(NOT_EQUAL, deopt_blob->label()); 1494 __ j(NOT_EQUAL, deopt_blob->label());
1495 } else { 1495 } else {
1496 __ j(EQUAL, &store_field, Assembler::kNearJump); 1496 __ j(EQUAL, &store_field);
1497 } 1497 }
1498 } 1498 }
1499 Class& cls = Class::Handle(); 1499 Class& cls = Class::Handle();
1500 ic_data.GetOneClassCheckAt(0, &cls, &target); 1500 ic_data.GetOneClassCheckAt(0, &cls, &target);
1501 1501
1502 __ Bind(&store_field); 1502 __ Bind(&store_field);
1503 ASSERT(target.kind() == RawFunction::kImplicitSetter); 1503 ASSERT(target.kind() == RawFunction::kImplicitSetter);
1504 intptr_t field_offset = GetFieldOffset(cls, field_name); 1504 intptr_t field_offset = GetFieldOffset(cls, field_name);
1505 ASSERT(field_offset >= 0); 1505 ASSERT(field_offset >= 0);
1506 __ StoreIntoObject(recv_reg, FieldAddress(recv_reg, field_offset), value_reg); 1506 __ StoreIntoObject(recv_reg, FieldAddress(recv_reg, field_offset), value_reg);
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize)); 2550 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize));
2551 // Result is in EAX. 2551 // Result is in EAX.
2552 if (IsResultNeeded(node)) { 2552 if (IsResultNeeded(node)) {
2553 __ pushl(EAX); 2553 __ pushl(EAX);
2554 } 2554 }
2555 } 2555 }
2556 2556
2557 } // namespace dart 2557 } // namespace dart
2558 2558
2559 #endif // defined TARGET_ARCH_IA32 2559 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698