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

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

Issue 8240005: Handle bug 5442338: PCDescriptors generated wrongly, disallowing optimizations, causing assert fa... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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/code_generator_ia32.cc ('k') | 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 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 } 1523 }
1524 DeoptimizationBlob* deopt_blob = AddDeoptimizationBlob(node, EAX, EDX); 1524 DeoptimizationBlob* deopt_blob = AddDeoptimizationBlob(node, EAX, EDX);
1525 Label compare; 1525 Label compare;
1526 // Comparison with NULL is "===". 1526 // Comparison with NULL is "===".
1527 const Immediate raw_null = 1527 const Immediate raw_null =
1528 Immediate(reinterpret_cast<intptr_t>(Object::null())); 1528 Immediate(reinterpret_cast<intptr_t>(Object::null()));
1529 __ cmpl(EAX, raw_null); 1529 __ cmpl(EAX, raw_null);
1530 if (num_classes == 0) { 1530 if (num_classes == 0) {
1531 __ j(NOT_EQUAL, deopt_blob->label()); 1531 __ j(NOT_EQUAL, deopt_blob->label());
1532 } else { 1532 } else {
1533 __ j(EQUAL, &compare, Assembler::kNearJump); 1533 __ j(EQUAL, &compare);
1534 // Smi causes deoptimization. 1534 // Smi causes deoptimization.
1535 __ testl(EAX, Immediate(kSmiTagMask)); 1535 __ testl(EAX, Immediate(kSmiTagMask));
1536 __ j(ZERO, deopt_blob->label()); 1536 __ j(ZERO, deopt_blob->label());
1537 __ movl(EBX, FieldAddress(EAX, Object::class_offset())); 1537 __ movl(EBX, FieldAddress(EAX, Object::class_offset()));
1538 for (intptr_t i = 0; i < num_classes; i++) { 1538 for (intptr_t i = 0; i < num_classes; i++) {
1539 const Class& cls = *(*classes)[i]; 1539 const Class& cls = *(*classes)[i];
1540 __ CompareObject(EBX, cls); 1540 __ CompareObject(EBX, cls);
1541 if (i == (num_classes - 1)) { 1541 if (i == (num_classes - 1)) {
1542 __ j(NOT_EQUAL, deopt_blob->label()); 1542 __ j(NOT_EQUAL, deopt_blob->label());
1543 } else { 1543 } else {
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize)); 2147 __ addl(ESP, Immediate(node->arguments()->length() * kWordSize));
2148 // Result is in EAX. 2148 // Result is in EAX.
2149 if (IsResultNeeded(node)) { 2149 if (IsResultNeeded(node)) {
2150 __ pushl(EAX); 2150 __ pushl(EAX);
2151 } 2151 }
2152 } 2152 }
2153 2153
2154 } // namespace dart 2154 } // namespace dart
2155 2155
2156 #endif // defined TARGET_ARCH_IA32 2156 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698