| 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 "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
| (...skipping 4301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4312 CURRENT_FUNC); | 4312 CURRENT_FUNC); |
| 4313 } | 4313 } |
| 4314 field = lib.LookupFieldAllowPrivate(field_name); | 4314 field = lib.LookupFieldAllowPrivate(field_name); |
| 4315 if (field.IsNull()) { | 4315 if (field.IsNull()) { |
| 4316 // No field found and no ambiguity error. Check for a getter in the lib. | 4316 // No field found and no ambiguity error. Check for a getter in the lib. |
| 4317 const String& getter_name = | 4317 const String& getter_name = |
| 4318 String::Handle(Z, Field::GetterName(field_name)); | 4318 String::Handle(Z, Field::GetterName(field_name)); |
| 4319 getter = lib.LookupFunctionAllowPrivate(getter_name); | 4319 getter = lib.LookupFunctionAllowPrivate(getter_name); |
| 4320 } else if (!field.IsNull() && field.IsUninitialized()) { | 4320 } else if (!field.IsNull() && field.IsUninitialized()) { |
| 4321 // A field was found. Check for a getter in the field's owner classs. | 4321 // A field was found. Check for a getter in the field's owner classs. |
| 4322 const Class& cls = Class::Handle(Z, field.owner()); | 4322 const Class& cls = Class::Handle(Z, field.Owner()); |
| 4323 const String& getter_name = String::Handle(Z, | 4323 const String& getter_name = String::Handle(Z, |
| 4324 Field::GetterName(field_name)); | 4324 Field::GetterName(field_name)); |
| 4325 getter = cls.LookupStaticFunctionAllowPrivate(getter_name); | 4325 getter = cls.LookupStaticFunctionAllowPrivate(getter_name); |
| 4326 } | 4326 } |
| 4327 | 4327 |
| 4328 if (!getter.IsNull()) { | 4328 if (!getter.IsNull()) { |
| 4329 // Invoke the getter and return the result. | 4329 // Invoke the getter and return the result. |
| 4330 return Api::NewHandle( | 4330 return Api::NewHandle( |
| 4331 T, DartEntry::InvokeFunction(getter, Object::empty_array())); | 4331 T, DartEntry::InvokeFunction(getter, Object::empty_array())); |
| 4332 } | 4332 } |
| (...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6166 return Api::Success(); | 6166 return Api::Success(); |
| 6167 } | 6167 } |
| 6168 #endif // DART_PRECOMPILER | 6168 #endif // DART_PRECOMPILER |
| 6169 | 6169 |
| 6170 | 6170 |
| 6171 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6171 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
| 6172 return Dart::IsRunningPrecompiledCode(); | 6172 return Dart::IsRunningPrecompiledCode(); |
| 6173 } | 6173 } |
| 6174 | 6174 |
| 6175 } // namespace dart | 6175 } // namespace dart |
| OLD | NEW |