| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1680 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); | 1680 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); |
| 1681 | 1681 |
| 1682 __ movl(EDX, FieldAddress(EDX, Type::type_class_offset())); | 1682 __ movl(EDX, FieldAddress(EDX, Type::type_class_offset())); |
| 1683 __ movl(ECX, FieldAddress(EDX, Class::type_parameters_offset())); | 1683 __ movl(ECX, FieldAddress(EDX, Class::type_parameters_offset())); |
| 1684 // Check that class of type has no type parameters. | 1684 // Check that class of type has no type parameters. |
| 1685 __ cmpl(ECX, raw_null); | 1685 __ cmpl(ECX, raw_null); |
| 1686 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); | 1686 __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump); |
| 1687 // EAX has non-parameterized class. | 1687 // EAX has non-parameterized class. |
| 1688 // Check class equality | 1688 // Check class equality |
| 1689 __ movl(ECX, FieldAddress(EAX, Object::class_offset())); | 1689 __ movl(ECX, FieldAddress(EAX, Object::class_offset())); |
| 1690 __ movl(ECX, FieldAddress(ECX, Type::Type::type_class_offset())); | 1690 __ movl(ECX, FieldAddress(ECX, Type::type_class_offset())); |
| 1691 __ cmpl(ECX, EDX); | 1691 __ cmpl(ECX, EDX); |
| 1692 __ j(EQUAL, is_instance_lbl); | 1692 __ j(EQUAL, is_instance_lbl); |
| 1693 | 1693 |
| 1694 // We have a non-parameterized class in EDX, compare with class of | 1694 // We have a non-parameterized class in EDX, compare with class of |
| 1695 // value in EAX. EAX, EDX are preserved in stub. | 1695 // value in EAX. EAX, EDX are preserved in stub. |
| 1696 __ movl(ECX, FieldAddress(EAX, Object::class_offset())); | 1696 __ movl(ECX, FieldAddress(EAX, Object::class_offset())); |
| 1697 __ call(&StubCode::IsRawSubTypeLabel()); | 1697 __ call(&StubCode::IsRawSubTypeLabel()); |
| 1698 // Result in EBX: 1 is raw subtype. | 1698 // Result in EBX: 1 is raw subtype. |
| 1699 __ cmpl(EBX, Immediate(1)); | 1699 __ cmpl(EBX, Immediate(1)); |
| 1700 __ j(EQUAL, is_instance_lbl); | 1700 __ j(EQUAL, is_instance_lbl); |
| (...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2919 const Error& error = Error::Handle( | 2919 const Error& error = Error::Handle( |
| 2920 Parser::FormatError(script, token_index, "Error", format, args)); | 2920 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2921 va_end(args); | 2921 va_end(args); |
| 2922 Isolate::Current()->long_jump_base()->Jump(1, error); | 2922 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2923 UNREACHABLE(); | 2923 UNREACHABLE(); |
| 2924 } | 2924 } |
| 2925 | 2925 |
| 2926 } // namespace dart | 2926 } // namespace dart |
| 2927 | 2927 |
| 2928 #endif // defined TARGET_ARCH_IA32 | 2928 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |