| 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 3599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3610 } | 3610 } |
| 3611 | 3611 |
| 3612 | 3612 |
| 3613 void Class::set_allocation_stub(const Code& value) const { | 3613 void Class::set_allocation_stub(const Code& value) const { |
| 3614 ASSERT(!value.IsNull()); | 3614 ASSERT(!value.IsNull()); |
| 3615 ASSERT(raw_ptr()->allocation_stub_ == Code::null()); | 3615 ASSERT(raw_ptr()->allocation_stub_ == Code::null()); |
| 3616 StorePointer(&raw_ptr()->allocation_stub_, value.raw()); | 3616 StorePointer(&raw_ptr()->allocation_stub_, value.raw()); |
| 3617 } | 3617 } |
| 3618 | 3618 |
| 3619 | 3619 |
| 3620 void Class::DisableAllocationStub() const { |
| 3621 const Code& alloc_stub = Code::Handle(allocation_stub()); |
| 3622 if (!alloc_stub.IsNull()) { |
| 3623 CodePatcher::PatchEntry(alloc_stub); |
| 3624 StorePointer(&raw_ptr()->allocation_stub_, Code::null()); |
| 3625 } |
| 3626 } |
| 3627 |
| 3628 |
| 3620 bool Class::IsFunctionClass() const { | 3629 bool Class::IsFunctionClass() const { |
| 3621 return raw() == Type::Handle(Type::Function()).type_class(); | 3630 return raw() == Type::Handle(Type::Function()).type_class(); |
| 3622 } | 3631 } |
| 3623 | 3632 |
| 3624 | 3633 |
| 3625 bool Class::IsCanonicalSignatureClass() const { | 3634 bool Class::IsCanonicalSignatureClass() const { |
| 3626 const Function& function = Function::Handle(signature_function()); | 3635 const Function& function = Function::Handle(signature_function()); |
| 3627 return (!function.IsNull() && (function.signature_class() == raw())); | 3636 return (!function.IsNull() && (function.signature_class() == raw())); |
| 3628 } | 3637 } |
| 3629 | 3638 |
| (...skipping 16732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20362 return tag_label.ToCString(); | 20371 return tag_label.ToCString(); |
| 20363 } | 20372 } |
| 20364 | 20373 |
| 20365 | 20374 |
| 20366 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20375 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20367 Instance::PrintJSONImpl(stream, ref); | 20376 Instance::PrintJSONImpl(stream, ref); |
| 20368 } | 20377 } |
| 20369 | 20378 |
| 20370 | 20379 |
| 20371 } // namespace dart | 20380 } // namespace dart |
| OLD | NEW |