| 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_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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |