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 13171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13182 StorePointer(NativeFieldsAddr(), native_fields.raw()); | 13182 StorePointer(NativeFieldsAddr(), native_fields.raw()); |
13183 } | 13183 } |
13184 for (uint16_t i = 0; i < num_native_fields; i++) { | 13184 for (uint16_t i = 0; i < num_native_fields; i++) { |
13185 intptr_t byte_offset = i * sizeof(intptr_t); | 13185 intptr_t byte_offset = i * sizeof(intptr_t); |
13186 TypedData::Cast(native_fields).SetIntPtr(byte_offset, field_values[i]); | 13186 TypedData::Cast(native_fields).SetIntPtr(byte_offset, field_values[i]); |
13187 } | 13187 } |
13188 } | 13188 } |
13189 | 13189 |
13190 | 13190 |
13191 bool Instance::IsClosure() const { | 13191 bool Instance::IsClosure() const { |
13192 const Class& cls = Class::Handle(clazz()); | 13192 return Class::IsSignatureClass(clazz()); |
13193 return cls.IsSignatureClass(); | |
13194 } | 13193 } |
13195 | 13194 |
13196 | 13195 |
13197 bool Instance::IsCallable(Function* function, Context* context) const { | 13196 bool Instance::IsCallable(Function* function, Context* context) const { |
13198 Class& cls = Class::Handle(clazz()); | 13197 Class& cls = Class::Handle(clazz()); |
13199 if (cls.IsSignatureClass()) { | 13198 if (cls.IsSignatureClass()) { |
13200 if (function != NULL) { | 13199 if (function != NULL) { |
13201 *function = Closure::function(*this); | 13200 *function = Closure::function(*this); |
13202 } | 13201 } |
13203 if (context != NULL) { | 13202 if (context != NULL) { |
(...skipping 5961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19165 return tag_label.ToCString(); | 19164 return tag_label.ToCString(); |
19166 } | 19165 } |
19167 | 19166 |
19168 | 19167 |
19169 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19168 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
19170 Instance::PrintJSONImpl(stream, ref); | 19169 Instance::PrintJSONImpl(stream, ref); |
19171 } | 19170 } |
19172 | 19171 |
19173 | 19172 |
19174 } // namespace dart | 19173 } // namespace dart |
OLD | NEW |