| 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 "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
| (...skipping 5154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5165 type_args_obj ^= TypeArguments::New(num_expected_type_arguments); | 5165 type_args_obj ^= TypeArguments::New(num_expected_type_arguments); |
| 5166 AbstractType& type_arg = AbstractType::Handle(); | 5166 AbstractType& type_arg = AbstractType::Handle(); |
| 5167 for (intptr_t i = 0; i < number_of_type_arguments; i++) { | 5167 for (intptr_t i = 0; i < number_of_type_arguments; i++) { |
| 5168 type_arg ^= array.At(i); | 5168 type_arg ^= array.At(i); |
| 5169 type_args_obj.SetTypeAt(i, type_arg); | 5169 type_args_obj.SetTypeAt(i, type_arg); |
| 5170 } | 5170 } |
| 5171 } | 5171 } |
| 5172 | 5172 |
| 5173 // Construct the type object, canonicalize it and return. | 5173 // Construct the type object, canonicalize it and return. |
| 5174 Type& instantiated_type = Type::Handle( | 5174 Type& instantiated_type = Type::Handle( |
| 5175 Type::New(cls, type_args_obj, Token::kNoSourcePos)); | 5175 Type::New(cls, type_args_obj, TokenPosition::kNoSource)); |
| 5176 instantiated_type ^= ClassFinalizer::FinalizeType( | 5176 instantiated_type ^= ClassFinalizer::FinalizeType( |
| 5177 cls, instantiated_type, ClassFinalizer::kCanonicalize); | 5177 cls, instantiated_type, ClassFinalizer::kCanonicalize); |
| 5178 return Api::NewHandle(T, instantiated_type.raw()); | 5178 return Api::NewHandle(T, instantiated_type.raw()); |
| 5179 } | 5179 } |
| 5180 | 5180 |
| 5181 | 5181 |
| 5182 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library) { | 5182 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library) { |
| 5183 DARTSCOPE(Thread::Current()); | 5183 DARTSCOPE(Thread::Current()); |
| 5184 const Library& lib = Api::UnwrapLibraryHandle(Z, library); | 5184 const Library& lib = Api::UnwrapLibraryHandle(Z, library); |
| 5185 if (lib.IsNull()) { | 5185 if (lib.IsNull()) { |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6015 return Api::Success(); | 6015 return Api::Success(); |
| 6016 } | 6016 } |
| 6017 #endif // DART_PRECOMPILED_RUNTIME | 6017 #endif // DART_PRECOMPILED_RUNTIME |
| 6018 | 6018 |
| 6019 | 6019 |
| 6020 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6020 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
| 6021 return Dart::IsRunningPrecompiledCode(); | 6021 return Dart::IsRunningPrecompiledCode(); |
| 6022 } | 6022 } |
| 6023 | 6023 |
| 6024 } // namespace dart | 6024 } // namespace dart |
| OLD | NEW |