Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: runtime/lib/mirrors.cc

Issue 2606993002: Second try: Fix resolution and canonicalization of typedefs and function types (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | runtime/vm/kernel_to_il.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "lib/mirrors.h" 5 #include "lib/mirrors.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bootstrap_natives.h" 8 #include "vm/bootstrap_natives.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 } else { 845 } else {
846 UNREACHABLE(); 846 UNREACHABLE();
847 } 847 }
848 848
849 Class& klass = Class::Handle(); 849 Class& klass = Class::Handle();
850 Library& library = Library::Handle(); 850 Library& library = Library::Handle();
851 851
852 if (decl.IsClass()) { 852 if (decl.IsClass()) {
853 klass ^= decl.raw(); 853 klass ^= decl.raw();
854 library = klass.library(); 854 library = klass.library();
855 } else if (decl.IsFunction()) { 855 } else if (decl.IsFunction() && !Function::Cast(decl).IsSignatureFunction()) {
856 klass = Function::Cast(decl).origin(); 856 klass = Function::Cast(decl).origin();
857 library = klass.library(); 857 library = klass.library();
858 } else if (decl.IsField()) { 858 } else if (decl.IsField()) {
859 klass = Field::Cast(decl).Origin(); 859 klass = Field::Cast(decl).Origin();
860 library = klass.library(); 860 library = klass.library();
861 } else if (decl.IsLibrary()) { 861 } else if (decl.IsLibrary()) {
862 library ^= decl.raw(); 862 library ^= decl.raw();
863 } else if (decl.IsTypeParameter()) { 863 } else if (decl.IsTypeParameter()) {
864 klass ^= TypeParameter::Cast(decl).parameterized_class(); 864 klass ^= TypeParameter::Cast(decl).parameterized_class();
865 library = klass.library(); 865 library = klass.library();
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 2017
2018 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2018 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2019 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2019 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2020 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2020 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2021 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); 2021 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw();
2022 } 2022 }
2023 2023
2024 #endif // !PRODUCT 2024 #endif // !PRODUCT
2025 2025
2026 } // namespace dart 2026 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | runtime/vm/kernel_to_il.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698