| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |