| 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 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2285 __ Bind(&done); | 2285 __ Bind(&done); |
| 2286 } | 2286 } |
| 2287 return; | 2287 return; |
| 2288 } | 2288 } |
| 2289 | 2289 |
| 2290 if (Token::IsInstanceofOperator(node->kind())) { | 2290 if (Token::IsInstanceofOperator(node->kind())) { |
| 2291 VisitLoadOne(node->left(), EAX); | 2291 VisitLoadOne(node->left(), EAX); |
| 2292 ASSERT(node->right()->IsTypeNode()); | 2292 ASSERT(node->right()->IsTypeNode()); |
| 2293 GenerateInstanceOf(node->id(), | 2293 GenerateInstanceOf(node->id(), |
| 2294 node->token_index(), | 2294 node->token_index(), |
| 2295 node->left(), |
| 2295 node->right()->AsTypeNode()->type(), | 2296 node->right()->AsTypeNode()->type(), |
| 2296 (node->kind() == Token::kISNOT)); | 2297 (node->kind() == Token::kISNOT)); |
| 2297 if (!IsResultNeeded(node)) { | 2298 if (!IsResultNeeded(node)) { |
| 2298 __ popl(EAX); // Pop the result of the instanceof operation. | 2299 __ popl(EAX); // Pop the result of the instanceof operation. |
| 2299 } | 2300 } |
| 2300 return; | 2301 return; |
| 2301 } | 2302 } |
| 2302 | 2303 |
| 2303 if (AtIdNodeHasClassAt(node, node->id(), smi_class_, 0)) { | 2304 if (AtIdNodeHasClassAt(node, node->id(), smi_class_, 0)) { |
| 2304 if (GenerateSmiComparison(node)) { | 2305 if (GenerateSmiComparison(node)) { |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3066 } | 3067 } |
| 3067 } | 3068 } |
| 3068 // TODO(srdjan): Implement unary kSUB (negate) Mint. | 3069 // TODO(srdjan): Implement unary kSUB (negate) Mint. |
| 3069 CodeGenerator::VisitUnaryOpNode(node); | 3070 CodeGenerator::VisitUnaryOpNode(node); |
| 3070 } | 3071 } |
| 3071 | 3072 |
| 3072 | 3073 |
| 3073 } // namespace dart | 3074 } // namespace dart |
| 3074 | 3075 |
| 3075 #endif // defined TARGET_ARCH_IA32 | 3076 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |