| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 2856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2867 Function& constructor = Function::Handle(isolate); | 2867 Function& constructor = Function::Handle(isolate); |
| 2868 constructor ^= result.raw(); | 2868 constructor ^= result.raw(); |
| 2869 | 2869 |
| 2870 Instance& new_object = Instance::Handle(isolate); | 2870 Instance& new_object = Instance::Handle(isolate); |
| 2871 if (constructor.IsRedirectingFactory()) { | 2871 if (constructor.IsRedirectingFactory()) { |
| 2872 ClassFinalizer::ResolveRedirectingFactory(cls, constructor); | 2872 ClassFinalizer::ResolveRedirectingFactory(cls, constructor); |
| 2873 Type& redirect_type = Type::Handle(constructor.RedirectionType()); | 2873 Type& redirect_type = Type::Handle(constructor.RedirectionType()); |
| 2874 constructor = constructor.RedirectionTarget(); | 2874 constructor = constructor.RedirectionTarget(); |
| 2875 if (constructor.IsNull()) { | 2875 if (constructor.IsNull()) { |
| 2876 ASSERT(redirect_type.IsMalformed()); | 2876 ASSERT(redirect_type.IsMalformed()); |
| 2877 return Api::NewHandle(isolate, redirect_type.malformed_error()); | 2877 return Api::NewHandle(isolate, redirect_type.error()); |
| 2878 } | 2878 } |
| 2879 | 2879 |
| 2880 if (!redirect_type.IsInstantiated()) { | 2880 if (!redirect_type.IsInstantiated()) { |
| 2881 // The type arguments of the redirection type are instantiated from the | 2881 // The type arguments of the redirection type are instantiated from the |
| 2882 // type arguments of the type argument. | 2882 // type arguments of the type argument. |
| 2883 Error& bound_error = Error::Handle(); | 2883 Error& bound_error = Error::Handle(); |
| 2884 redirect_type ^= redirect_type.InstantiateFrom(type_arguments, | 2884 redirect_type ^= redirect_type.InstantiateFrom(type_arguments, |
| 2885 &bound_error); | 2885 &bound_error); |
| 2886 if (!bound_error.IsNull()) { | 2886 if (!bound_error.IsNull()) { |
| 2887 return Api::NewHandle(isolate, bound_error.raw()); | 2887 return Api::NewHandle(isolate, bound_error.raw()); |
| (...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4443 } | 4443 } |
| 4444 { | 4444 { |
| 4445 NoGCScope no_gc; | 4445 NoGCScope no_gc; |
| 4446 RawObject* raw_obj = obj.raw(); | 4446 RawObject* raw_obj = obj.raw(); |
| 4447 isolate->heap()->SetPeer(raw_obj, peer); | 4447 isolate->heap()->SetPeer(raw_obj, peer); |
| 4448 } | 4448 } |
| 4449 return Api::Success(); | 4449 return Api::Success(); |
| 4450 } | 4450 } |
| 4451 | 4451 |
| 4452 } // namespace dart | 4452 } // namespace dart |
| OLD | NEW |