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/code_generator.h" | 8 #include "vm/code_generator.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 AbstractType::ZoneHandle(parsed_function().function().result_type()), | 796 AbstractType::ZoneHandle(parsed_function().function().result_type()), |
797 String::ZoneHandle(String::NewSymbol("function result"))); | 797 String::ZoneHandle(String::NewSymbol("function result"))); |
798 } | 798 } |
799 } | 799 } |
800 GenerateReturnEpilog(); | 800 GenerateReturnEpilog(); |
801 } | 801 } |
802 | 802 |
803 | 803 |
804 void CodeGenerator::VisitLiteralNode(LiteralNode* node) { | 804 void CodeGenerator::VisitLiteralNode(LiteralNode* node) { |
805 if (!IsResultNeeded(node)) return; | 805 if (!IsResultNeeded(node)) return; |
806 const Object& literal = node->literal(); | 806 __ PushObject(node->literal()); |
807 if (literal.IsSmi()) { | |
808 __ pushl(Immediate(reinterpret_cast<int32_t>(literal.raw()))); | |
809 } else { | |
810 __ PushObject(literal); | |
811 } | |
812 } | 807 } |
813 | 808 |
814 | 809 |
815 void CodeGenerator::VisitTypeNode(TypeNode* node) { | 810 void CodeGenerator::VisitTypeNode(TypeNode* node) { |
816 // Type nodes are handled specially by the code generator. | 811 // Type nodes are handled specially by the code generator. |
817 UNREACHABLE(); | 812 UNREACHABLE(); |
818 } | 813 } |
819 | 814 |
820 | 815 |
821 void CodeGenerator::VisitAssignableNode(AssignableNode* node) { | 816 void CodeGenerator::VisitAssignableNode(AssignableNode* node) { |
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2746 message_buffer, kMessageBufferSize, | 2741 message_buffer, kMessageBufferSize, |
2747 format, args); | 2742 format, args); |
2748 va_end(args); | 2743 va_end(args); |
2749 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); | 2744 Isolate::Current()->long_jump_base()->Jump(1, message_buffer); |
2750 UNREACHABLE(); | 2745 UNREACHABLE(); |
2751 } | 2746 } |
2752 | 2747 |
2753 } // namespace dart | 2748 } // namespace dart |
2754 | 2749 |
2755 #endif // defined TARGET_ARCH_IA32 | 2750 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |