| 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 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2560 return; | 2560 return; |
| 2561 } | 2561 } |
| 2562 ASSERT(!IsResultNeeded(node)); | 2562 ASSERT(!IsResultNeeded(node)); |
| 2563 ASSERT(node->value() != NULL); | 2563 ASSERT(node->value() != NULL); |
| 2564 VisitLoadOne(node->value(), EAX); | 2564 VisitLoadOne(node->value(), EAX); |
| 2565 GenerateReturnEpilog(); | 2565 GenerateReturnEpilog(); |
| 2566 } | 2566 } |
| 2567 | 2567 |
| 2568 | 2568 |
| 2569 void OptimizingCodeGenerator::VisitSequenceNode(SequenceNode* node_sequence) { | 2569 void OptimizingCodeGenerator::VisitSequenceNode(SequenceNode* node_sequence) { |
| 2570 if (FLAG_enable_type_checks || | 2570 const intptr_t num_context_variables = (node_sequence->scope() != NULL) ? |
| 2571 (node_sequence->scope()->num_context_variables() > 0)) { | 2571 node_sequence->scope()->num_context_variables() : 0; |
| 2572 if (FLAG_enable_type_checks || (num_context_variables > 0)) { |
| 2572 CodeGenerator::VisitSequenceNode(node_sequence); | 2573 CodeGenerator::VisitSequenceNode(node_sequence); |
| 2573 return; | 2574 return; |
| 2574 } | 2575 } |
| 2575 for (int i = 0; i < node_sequence->length(); i++) { | 2576 for (int i = 0; i < node_sequence->length(); i++) { |
| 2576 AstNode* child_node = node_sequence->NodeAt(i); | 2577 AstNode* child_node = node_sequence->NodeAt(i); |
| 2577 state()->set_root_node(child_node); | 2578 state()->set_root_node(child_node); |
| 2578 child_node->Visit(this); | 2579 child_node->Visit(this); |
| 2579 } | 2580 } |
| 2580 if (node_sequence->label() != NULL) { | 2581 if (node_sequence->label() != NULL) { |
| 2581 __ Bind(node_sequence->label()->break_label()); | 2582 __ Bind(node_sequence->label()->break_label()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2594 if (IsResultNeeded(node)) { | 2595 if (IsResultNeeded(node)) { |
| 2595 // The result is the input value. | 2596 // The result is the input value. |
| 2596 __ pushl(EAX); | 2597 __ pushl(EAX); |
| 2597 } | 2598 } |
| 2598 } | 2599 } |
| 2599 | 2600 |
| 2600 | 2601 |
| 2601 } // namespace dart | 2602 } // namespace dart |
| 2602 | 2603 |
| 2603 #endif // defined TARGET_ARCH_IA32 | 2604 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |