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

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

Issue 23757051: Make Dart_FunctionOwner return handles on Types rather than Classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | no next file » | 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_mirrors_api.h" 5 #include "include/dart_mirrors_api.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart.h" 9 #include "vm/dart.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // Top-level functions are implemented as members of a hidden class. We hide 227 // Top-level functions are implemented as members of a hidden class. We hide
228 // that class here and instead answer the library. 228 // that class here and instead answer the library.
229 #if defined(DEBUG) 229 #if defined(DEBUG)
230 const Library& lib = Library::Handle(owner.library()); 230 const Library& lib = Library::Handle(owner.library());
231 if (lib.IsNull()) { 231 if (lib.IsNull()) {
232 ASSERT(owner.IsDynamicClass() || owner.IsVoidClass()); 232 ASSERT(owner.IsDynamicClass() || owner.IsVoidClass());
233 } 233 }
234 #endif 234 #endif
235 return Api::NewHandle(isolate, owner.library()); 235 return Api::NewHandle(isolate, owner.library());
236 } else { 236 } else {
237 return Api::NewHandle(isolate, owner.raw()); 237 return Api::NewHandle(isolate, owner.RareType());
238 } 238 }
239 } 239 }
240 240
241 241
242 DART_EXPORT Dart_Handle Dart_FunctionIsStatic(Dart_Handle function, 242 DART_EXPORT Dart_Handle Dart_FunctionIsStatic(Dart_Handle function,
243 bool* is_static) { 243 bool* is_static) {
244 Isolate* isolate = Isolate::Current(); 244 Isolate* isolate = Isolate::Current();
245 DARTSCOPE(isolate); 245 DARTSCOPE(isolate);
246 if (is_static == NULL) { 246 if (is_static == NULL) {
247 RETURN_NULL_ERROR(is_static); 247 RETURN_NULL_ERROR(is_static);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 RETURN_TYPE_ERROR(isolate, closure, Instance); 360 RETURN_TYPE_ERROR(isolate, closure, Instance);
361 } 361 }
362 362
363 ASSERT(ClassFinalizer::AllClassesFinalized()); 363 ASSERT(ClassFinalizer::AllClassesFinalized());
364 364
365 RawFunction* rf = Closure::function(closure_obj); 365 RawFunction* rf = Closure::function(closure_obj);
366 return Api::NewHandle(isolate, rf); 366 return Api::NewHandle(isolate, rf);
367 } 367 }
368 368
369 } // namespace dart 369 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698