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

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

Issue 1410383020: Eliminate all but one top-level class per library. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address Review Comments Created 5 years 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/object.h » ('j') | no next file with comments »
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 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 if (cls.is_synthesized_class() && 2017 if (cls.is_synthesized_class() &&
2018 !is_typedef && 2018 !is_typedef &&
2019 !cls.is_mixin_app_alias() && 2019 !cls.is_mixin_app_alias() &&
2020 !cls.is_enum_class()) { 2020 !cls.is_enum_class()) {
2021 return Instance::null(); // Synthetic. 2021 return Instance::null(); // Synthetic.
2022 } 2022 }
2023 script = cls.script(); 2023 script = cls.script();
2024 token_pos = cls.token_pos(); 2024 token_pos = cls.token_pos();
2025 } else if (decl.IsField()) { 2025 } else if (decl.IsField()) {
2026 const Field& field = Field::Cast(decl); 2026 const Field& field = Field::Cast(decl);
2027 const Class& owner = Class::Handle(field.owner()); 2027 script = field.script();
2028 script = owner.script();
2029 token_pos = field.token_pos(); 2028 token_pos = field.token_pos();
2030 } else if (decl.IsTypeParameter()) { 2029 } else if (decl.IsTypeParameter()) {
2031 const TypeParameter& type_var = TypeParameter::Cast(decl); 2030 const TypeParameter& type_var = TypeParameter::Cast(decl);
2032 const Class& owner = Class::Handle(type_var.parameterized_class()); 2031 const Class& owner = Class::Handle(type_var.parameterized_class());
2033 script = owner.script(); 2032 script = owner.script();
2034 token_pos = type_var.token_pos(); 2033 token_pos = type_var.token_pos();
2035 } else if (decl.IsLibrary()) { 2034 } else if (decl.IsLibrary()) {
2036 const Library& lib = Library::Cast(decl); 2035 const Library& lib = Library::Cast(decl);
2037 if (lib.raw() == Library::NativeWrappersLibrary()) { 2036 if (lib.raw() == Library::NativeWrappersLibrary()) {
2038 return Instance::null(); // No source. 2037 return Instance::null(); // No source.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 } 2106 }
2108 2107
2109 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { 2108 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) {
2110 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2109 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2111 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2110 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2112 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw(); 2111 return Bool::Get(a.IsSubtypeOf(b, NULL)).raw();
2113 } 2112 }
2114 2113
2115 2114
2116 } // namespace dart 2115 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698