OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #if defined(TARGET_ARCH_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
10 | 10 |
(...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2874 RawSubtypeTestCache* cache = static_cast<RawSubtypeTestCache*>(SP[0]); | 2874 RawSubtypeTestCache* cache = static_cast<RawSubtypeTestCache*>(SP[0]); |
2875 | 2875 |
2876 if (cache != null_value) { | 2876 if (cache != null_value) { |
2877 const intptr_t cid = SimulatorHelpers::GetClassId(instance); | 2877 const intptr_t cid = SimulatorHelpers::GetClassId(instance); |
2878 | 2878 |
2879 RawTypeArguments* instance_type_arguments = | 2879 RawTypeArguments* instance_type_arguments = |
2880 static_cast<RawTypeArguments*>(null_value); | 2880 static_cast<RawTypeArguments*>(null_value); |
2881 RawObject* instance_cid_or_function; | 2881 RawObject* instance_cid_or_function; |
2882 if (cid == kClosureCid) { | 2882 if (cid == kClosureCid) { |
2883 RawClosure* closure = static_cast<RawClosure*>(instance); | 2883 RawClosure* closure = static_cast<RawClosure*>(instance); |
2884 instance_type_arguments = closure->ptr()->type_arguments_; | 2884 instance_type_arguments = closure->ptr()->instantiator_; |
2885 instance_cid_or_function = closure->ptr()->function_; | 2885 instance_cid_or_function = closure->ptr()->function_; |
2886 } else { | 2886 } else { |
2887 instance_cid_or_function = Smi::New(cid); | 2887 instance_cid_or_function = Smi::New(cid); |
2888 | 2888 |
2889 RawClass* instance_class = thread->isolate()->class_table()->At(cid); | 2889 RawClass* instance_class = thread->isolate()->class_table()->At(cid); |
2890 if (instance_class->ptr()->num_type_arguments_ < 0) { | 2890 if (instance_class->ptr()->num_type_arguments_ < 0) { |
2891 goto InstanceOfCallRuntime; | 2891 goto InstanceOfCallRuntime; |
2892 } else if (instance_class->ptr()->num_type_arguments_ > 0) { | 2892 } else if (instance_class->ptr()->num_type_arguments_ > 0) { |
2893 instance_type_arguments = reinterpret_cast<RawTypeArguments**>( | 2893 instance_type_arguments = reinterpret_cast<RawTypeArguments**>( |
2894 instance->ptr())[instance_class->ptr() | 2894 instance->ptr())[instance_class->ptr() |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2963 RawTypeArguments* instantiator_type_arguments = | 2963 RawTypeArguments* instantiator_type_arguments = |
2964 static_cast<RawTypeArguments*>(args[1]); | 2964 static_cast<RawTypeArguments*>(args[1]); |
2965 | 2965 |
2966 const intptr_t cid = SimulatorHelpers::GetClassId(instance); | 2966 const intptr_t cid = SimulatorHelpers::GetClassId(instance); |
2967 | 2967 |
2968 RawTypeArguments* instance_type_arguments = | 2968 RawTypeArguments* instance_type_arguments = |
2969 static_cast<RawTypeArguments*>(null_value); | 2969 static_cast<RawTypeArguments*>(null_value); |
2970 RawObject* instance_cid_or_function; | 2970 RawObject* instance_cid_or_function; |
2971 if (cid == kClosureCid) { | 2971 if (cid == kClosureCid) { |
2972 RawClosure* closure = static_cast<RawClosure*>(instance); | 2972 RawClosure* closure = static_cast<RawClosure*>(instance); |
2973 instance_type_arguments = closure->ptr()->type_arguments_; | 2973 instance_type_arguments = closure->ptr()->instantiator_; |
2974 instance_cid_or_function = closure->ptr()->function_; | 2974 instance_cid_or_function = closure->ptr()->function_; |
2975 } else { | 2975 } else { |
2976 instance_cid_or_function = Smi::New(cid); | 2976 instance_cid_or_function = Smi::New(cid); |
2977 | 2977 |
2978 RawClass* instance_class = thread->isolate()->class_table()->At(cid); | 2978 RawClass* instance_class = thread->isolate()->class_table()->At(cid); |
2979 if (instance_class->ptr()->num_type_arguments_ < 0) { | 2979 if (instance_class->ptr()->num_type_arguments_ < 0) { |
2980 goto AssertAssignableCallRuntime; | 2980 goto AssertAssignableCallRuntime; |
2981 } else if (instance_class->ptr()->num_type_arguments_ > 0) { | 2981 } else if (instance_class->ptr()->num_type_arguments_ > 0) { |
2982 instance_type_arguments = reinterpret_cast<RawTypeArguments**>( | 2982 instance_type_arguments = reinterpret_cast<RawTypeArguments**>( |
2983 instance->ptr())[instance_class->ptr() | 2983 instance->ptr())[instance_class->ptr() |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3743 pc_ = pc; | 3743 pc_ = pc; |
3744 } | 3744 } |
3745 | 3745 |
3746 buf->Longjmp(); | 3746 buf->Longjmp(); |
3747 UNREACHABLE(); | 3747 UNREACHABLE(); |
3748 } | 3748 } |
3749 | 3749 |
3750 } // namespace dart | 3750 } // namespace dart |
3751 | 3751 |
3752 #endif // defined TARGET_ARCH_DBC | 3752 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |