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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 75713002: Distinguish between malformed and malbounded types more efficiently using the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('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) 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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698