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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 294943008: - Landing https://codereview.chromium.org/293963008/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 months 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 | « no previous file | runtime/vm/code_generator.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) 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 "lib/invocation_mirror.h" 5 #include "lib/invocation_mirror.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 Exceptions::ThrowByType(Exceptions::kNoSuchMethod, args); 95 Exceptions::ThrowByType(Exceptions::kNoSuchMethod, args);
96 UNREACHABLE(); 96 UNREACHABLE();
97 } 97 }
98 98
99 99
100 static void EnsureConstructorsAreCompiled(const Function& func) { 100 static void EnsureConstructorsAreCompiled(const Function& func) {
101 // Only generative constructors can have initializing formals. 101 // Only generative constructors can have initializing formals.
102 if (!func.IsConstructor()) return; 102 if (!func.IsConstructor()) return;
103 103
104 const Class& cls = Class::Handle(func.Owner()); 104 Isolate* isolate = Isolate::Current();
105 const Error& error = Error::Handle(cls.EnsureIsFinalized(Isolate::Current())); 105 const Class& cls = Class::Handle(isolate, func.Owner());
106 const Error& error = Error::Handle(
107 isolate, cls.EnsureIsFinalized(Isolate::Current()));
106 if (!error.IsNull()) { 108 if (!error.IsNull()) {
107 ThrowInvokeError(error); 109 ThrowInvokeError(error);
108 UNREACHABLE(); 110 UNREACHABLE();
109 } 111 }
110 if (!func.HasCode()) { 112 if (!func.HasCode()) {
111 const Error& error = Error::Handle(Compiler::CompileFunction(func)); 113 const Error& error = Error::Handle(
114 isolate, Compiler::CompileFunction(isolate, func));
112 if (!error.IsNull()) { 115 if (!error.IsNull()) {
113 ThrowInvokeError(error); 116 ThrowInvokeError(error);
114 UNREACHABLE(); 117 UNREACHABLE();
115 } 118 }
116 } 119 }
117 } 120 }
118 121
119 static RawInstance* CreateParameterMirrorList(const Function& func, 122 static RawInstance* CreateParameterMirrorList(const Function& func,
120 const Instance& owner_mirror) { 123 const Instance& owner_mirror) {
121 HANDLESCOPE(Isolate::Current()); 124 HANDLESCOPE(Isolate::Current());
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 } 2251 }
2249 2252
2250 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { 2253 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) {
2251 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 2254 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
2252 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 2255 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
2253 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); 2256 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw();
2254 } 2257 }
2255 2258
2256 2259
2257 } // namespace dart 2260 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698