OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 5113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5124 type_args_obj ^= TypeArguments::New(num_expected_type_arguments); | 5124 type_args_obj ^= TypeArguments::New(num_expected_type_arguments); |
5125 AbstractType& type_arg = AbstractType::Handle(); | 5125 AbstractType& type_arg = AbstractType::Handle(); |
5126 for (intptr_t i = 0; i < number_of_type_arguments; i++) { | 5126 for (intptr_t i = 0; i < number_of_type_arguments; i++) { |
5127 type_arg ^= array.At(i); | 5127 type_arg ^= array.At(i); |
5128 type_args_obj.SetTypeAt(i, type_arg); | 5128 type_args_obj.SetTypeAt(i, type_arg); |
5129 } | 5129 } |
5130 } | 5130 } |
5131 | 5131 |
5132 // Construct the type object, canonicalize it and return. | 5132 // Construct the type object, canonicalize it and return. |
5133 Type& instantiated_type = Type::Handle( | 5133 Type& instantiated_type = Type::Handle( |
5134 Type::New(cls, type_args_obj, Scanner::kNoSourcePos)); | 5134 Type::New(cls, type_args_obj, Token::kNoSourcePos)); |
5135 instantiated_type ^= ClassFinalizer::FinalizeType( | 5135 instantiated_type ^= ClassFinalizer::FinalizeType( |
5136 cls, instantiated_type, ClassFinalizer::kCanonicalize); | 5136 cls, instantiated_type, ClassFinalizer::kCanonicalize); |
5137 return Api::NewHandle(T, instantiated_type.raw()); | 5137 return Api::NewHandle(T, instantiated_type.raw()); |
5138 } | 5138 } |
5139 | 5139 |
5140 | 5140 |
5141 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library) { | 5141 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library) { |
5142 DARTSCOPE(Thread::Current()); | 5142 DARTSCOPE(Thread::Current()); |
5143 const Library& lib = Api::UnwrapLibraryHandle(Z, library); | 5143 const Library& lib = Api::UnwrapLibraryHandle(Z, library); |
5144 if (lib.IsNull()) { | 5144 if (lib.IsNull()) { |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5974 return Api::Success(); | 5974 return Api::Success(); |
5975 } | 5975 } |
5976 #endif // DART_PRECOMPILED_RUNTIME | 5976 #endif // DART_PRECOMPILED_RUNTIME |
5977 | 5977 |
5978 | 5978 |
5979 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 5979 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
5980 return Dart::IsRunningPrecompiledCode(); | 5980 return Dart::IsRunningPrecompiledCode(); |
5981 } | 5981 } |
5982 | 5982 |
5983 } // namespace dart | 5983 } // namespace dart |
OLD | NEW |