| 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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); | 1690 const Bool& bool_true = Bool::ZoneHandle(Bool::True()); |
| 1691 __ CompareObject(ECX, bool_true); | 1691 __ CompareObject(ECX, bool_true); |
| 1692 __ j(EQUAL, is_instance_lbl); | 1692 __ j(EQUAL, is_instance_lbl); |
| 1693 __ jmp(is_not_instance_lbl); | 1693 __ jmp(is_not_instance_lbl); |
| 1694 __ Bind(&fall_through); | 1694 __ Bind(&fall_through); |
| 1695 return type_test_cache.raw(); | 1695 return type_test_cache.raw(); |
| 1696 } | 1696 } |
| 1697 if (type.IsType()) { | 1697 if (type.IsType()) { |
| 1698 Label fall_through; | 1698 Label fall_through; |
| 1699 __ testl(EAX, Immediate(kSmiTagMask)); // Is instance Smi? | 1699 __ testl(EAX, Immediate(kSmiTagMask)); // Is instance Smi? |
| 1700 __ j(ZERO, is_not_instance_lbl, Assembler::kNearJump); | 1700 __ j(ZERO, is_not_instance_lbl); |
| 1701 // Uninstantiated type class is known at compile time, but the type | 1701 // Uninstantiated type class is known at compile time, but the type |
| 1702 // arguments are determined at runtime by the instantiator. | 1702 // arguments are determined at runtime by the instantiator. |
| 1703 const SubtypeTestCache& type_test_cache = | 1703 const SubtypeTestCache& type_test_cache = |
| 1704 SubtypeTestCache::ZoneHandle(SubtypeTestCache::New()); | 1704 SubtypeTestCache::ZoneHandle(SubtypeTestCache::New()); |
| 1705 __ LoadObject(EDX, type_test_cache); | 1705 __ LoadObject(EDX, type_test_cache); |
| 1706 __ pushl(EDX); // Subtype test cache. | 1706 __ pushl(EDX); // Subtype test cache. |
| 1707 __ pushl(EAX); // Instance. | 1707 __ pushl(EAX); // Instance. |
| 1708 const bool kPushInstantiator = false; | 1708 const bool kPushInstantiator = false; |
| 1709 GenerateInstantiatorTypeArguments(token_index, kPushInstantiator); | 1709 GenerateInstantiatorTypeArguments(token_index, kPushInstantiator); |
| 1710 __ call(&StubCode::Subtype3TestCacheLabel()); | 1710 __ call(&StubCode::Subtype3TestCacheLabel()); |
| (...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2983 const Error& error = Error::Handle( | 2983 const Error& error = Error::Handle( |
| 2984 Parser::FormatError(script, token_index, "Error", format, args)); | 2984 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2985 va_end(args); | 2985 va_end(args); |
| 2986 Isolate::Current()->long_jump_base()->Jump(1, error); | 2986 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2987 UNREACHABLE(); | 2987 UNREACHABLE(); |
| 2988 } | 2988 } |
| 2989 | 2989 |
| 2990 } // namespace dart | 2990 } // namespace dart |
| 2991 | 2991 |
| 2992 #endif // defined TARGET_ARCH_IA32 | 2992 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |