OLD | NEW |
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 "vm/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 14814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14825 StorePointer(NativeFieldsAddr(), native_fields.raw()); | 14825 StorePointer(NativeFieldsAddr(), native_fields.raw()); |
14826 } | 14826 } |
14827 for (uint16_t i = 0; i < num_native_fields; i++) { | 14827 for (uint16_t i = 0; i < num_native_fields; i++) { |
14828 intptr_t byte_offset = i * sizeof(intptr_t); | 14828 intptr_t byte_offset = i * sizeof(intptr_t); |
14829 TypedData::Cast(native_fields).SetIntPtr(byte_offset, field_values[i]); | 14829 TypedData::Cast(native_fields).SetIntPtr(byte_offset, field_values[i]); |
14830 } | 14830 } |
14831 } | 14831 } |
14832 | 14832 |
14833 | 14833 |
14834 bool Instance::IsClosure() const { | 14834 bool Instance::IsClosure() const { |
14835 return Class::IsSignatureClass(clazz()); | 14835 const Class& cls = Class::Handle(clazz()); |
| 14836 return cls.IsSignatureClass(); |
14836 } | 14837 } |
14837 | 14838 |
14838 | 14839 |
14839 bool Instance::IsCallable(Function* function) const { | 14840 bool Instance::IsCallable(Function* function) const { |
14840 Class& cls = Class::Handle(clazz()); | 14841 Class& cls = Class::Handle(clazz()); |
14841 if (cls.IsSignatureClass()) { | 14842 if (cls.IsSignatureClass()) { |
14842 if (function != NULL) { | 14843 if (function != NULL) { |
14843 *function = Closure::function(*this); | 14844 *function = Closure::function(*this); |
14844 } | 14845 } |
14845 return true; | 14846 return true; |
(...skipping 6910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21756 return tag_label.ToCString(); | 21757 return tag_label.ToCString(); |
21757 } | 21758 } |
21758 | 21759 |
21759 | 21760 |
21760 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21761 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
21761 Instance::PrintJSONImpl(stream, ref); | 21762 Instance::PrintJSONImpl(stream, ref); |
21762 } | 21763 } |
21763 | 21764 |
21764 | 21765 |
21765 } // namespace dart | 21766 } // namespace dart |
OLD | NEW |