| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_debugger_api.h" | 6 #include "include/dart_debugger_api.h" |
| 7 #include "include/dart_mirrors_api.h" | 7 #include "include/dart_mirrors_api.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/dart_api_state.h" // TODO(11742): Remove with CreateMirrorRef. | 9 #include "vm/dart_api_state.h" // TODO(11742): Remove with CreateMirrorRef. |
| 10 #include "vm/bootstrap_natives.h" | 10 #include "vm/bootstrap_natives.h" |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 if (Dart_IsError(type)) { | 364 if (Dart_IsError(type)) { |
| 365 return type; | 365 return type; |
| 366 } | 366 } |
| 367 | 367 |
| 368 Dart_Handle upper_bound = Dart_TypeVariableUpperBound(type_var); | 368 Dart_Handle upper_bound = Dart_TypeVariableUpperBound(type_var); |
| 369 if (Dart_IsError(upper_bound)) { | 369 if (Dart_IsError(upper_bound)) { |
| 370 return upper_bound; | 370 return upper_bound; |
| 371 } | 371 } |
| 372 | 372 |
| 373 Dart_Handle args[] = { | 373 Dart_Handle args[] = { |
| 374 CreateMirrorReference(type_var), |
| 374 type_var_name, | 375 type_var_name, |
| 375 owner_mirror, | 376 owner_mirror, |
| 376 CreateLazyMirror(upper_bound), | 377 CreateLazyMirror(upper_bound), |
| 377 }; | 378 }; |
| 378 Dart_Handle mirror = Dart_New(type, Dart_Null(), ARRAY_SIZE(args), args); | 379 Dart_Handle mirror = Dart_New(type, Dart_Null(), ARRAY_SIZE(args), args); |
| 379 return mirror; | 380 return mirror; |
| 380 } | 381 } |
| 381 | 382 |
| 382 | 383 |
| 383 static Dart_Handle CreateTypeVariableMap(Dart_Handle owner, | 384 static Dart_Handle CreateTypeVariableMap(Dart_Handle owner, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 if (Dart_IsError(mirror_type)) { | 429 if (Dart_IsError(mirror_type)) { |
| 429 return mirror_type; | 430 return mirror_type; |
| 430 } | 431 } |
| 431 | 432 |
| 432 Dart_Handle referent = Dart_ClassGetTypedefReferent(cls); | 433 Dart_Handle referent = Dart_ClassGetTypedefReferent(cls); |
| 433 if (Dart_IsError(referent)) { | 434 if (Dart_IsError(referent)) { |
| 434 return referent; | 435 return referent; |
| 435 } | 436 } |
| 436 | 437 |
| 437 Dart_Handle args[] = { | 438 Dart_Handle args[] = { |
| 439 CreateMirrorReference(cls), |
| 438 cls_name, | 440 cls_name, |
| 439 owner_mirror, | 441 owner_mirror, |
| 440 CreateLazyMirror(referent), | 442 CreateLazyMirror(referent), |
| 441 }; | 443 }; |
| 442 Dart_Handle mirror = | 444 Dart_Handle mirror = |
| 443 Dart_New(mirror_type, Dart_Null(), ARRAY_SIZE(args), args); | 445 Dart_New(mirror_type, Dart_Null(), ARRAY_SIZE(args), args); |
| 444 return mirror; | 446 return mirror; |
| 445 } | 447 } |
| 446 | 448 |
| 447 | 449 |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1828 func.parent_function()), Instance::Handle()); | 1830 func.parent_function()), Instance::Handle()); |
| 1829 } | 1831 } |
| 1830 const Class& owner = Class::Handle(func.Owner()); | 1832 const Class& owner = Class::Handle(func.Owner()); |
| 1831 if (owner.IsTopLevel()) { | 1833 if (owner.IsTopLevel()) { |
| 1832 return CreateLibraryMirror(Library::Handle(owner.library())); | 1834 return CreateLibraryMirror(Library::Handle(owner.library())); |
| 1833 } | 1835 } |
| 1834 return CreateClassMirror(owner, Instance::Handle()); | 1836 return CreateClassMirror(owner, Instance::Handle()); |
| 1835 } | 1837 } |
| 1836 | 1838 |
| 1837 } // namespace dart | 1839 } // namespace dart |
| OLD | NEW |