| 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 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2334 Object& object = thread->ObjectHandle(); | 2334 Object& object = thread->ObjectHandle(); |
| 2335 dispatcher_cache ^= invocation_dispatcher_cache(); | 2335 dispatcher_cache ^= invocation_dispatcher_cache(); |
| 2336 object = dispatcher_cache.At(idx); | 2336 object = dispatcher_cache.At(idx); |
| 2337 if (!object.IsFunction()) { | 2337 if (!object.IsFunction()) { |
| 2338 return Function::null(); | 2338 return Function::null(); |
| 2339 } | 2339 } |
| 2340 return Function::Cast(object).raw(); | 2340 return Function::Cast(object).raw(); |
| 2341 } | 2341 } |
| 2342 | 2342 |
| 2343 | 2343 |
| 2344 void Class::set_closures(const GrowableObjectArray& value) const { |
| 2345 StorePointer(&raw_ptr()->closure_functions_, value.raw()); |
| 2346 } |
| 2347 |
| 2348 |
| 2344 void Class::AddClosureFunction(const Function& function) const { | 2349 void Class::AddClosureFunction(const Function& function) const { |
| 2345 GrowableObjectArray& closures = | 2350 GrowableObjectArray& closures = |
| 2346 GrowableObjectArray::Handle(raw_ptr()->closure_functions_); | 2351 GrowableObjectArray::Handle(raw_ptr()->closure_functions_); |
| 2347 if (closures.IsNull()) { | 2352 if (closures.IsNull()) { |
| 2348 closures = GrowableObjectArray::New(4, Heap::kOld); | 2353 closures = GrowableObjectArray::New(4, Heap::kOld); |
| 2349 StorePointer(&raw_ptr()->closure_functions_, closures.raw()); | 2354 StorePointer(&raw_ptr()->closure_functions_, closures.raw()); |
| 2350 } | 2355 } |
| 2351 ASSERT(function.IsNonImplicitClosureFunction()); | 2356 ASSERT(function.IsNonImplicitClosureFunction()); |
| 2352 ASSERT(function.Owner() == this->raw()); | 2357 ASSERT(function.Owner() == this->raw()); |
| 2353 closures.Add(function, Heap::kOld); | 2358 closures.Add(function, Heap::kOld); |
| (...skipping 19213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21567 return tag_label.ToCString(); | 21572 return tag_label.ToCString(); |
| 21568 } | 21573 } |
| 21569 | 21574 |
| 21570 | 21575 |
| 21571 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21576 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 21572 Instance::PrintJSONImpl(stream, ref); | 21577 Instance::PrintJSONImpl(stream, ref); |
| 21573 } | 21578 } |
| 21574 | 21579 |
| 21575 | 21580 |
| 21576 } // namespace dart | 21581 } // namespace dart |
| OLD | NEW |