| 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 #ifndef RUNTIME_VM_OBJECT_H_ | 5 #ifndef RUNTIME_VM_OBJECT_H_ |
| 6 #define RUNTIME_VM_OBJECT_H_ | 6 #define RUNTIME_VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 4674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4685 } | 4685 } |
| 4686 | 4686 |
| 4687 bool is_optimized() const { | 4687 bool is_optimized() const { |
| 4688 return OptimizedBit::decode(raw_ptr()->state_bits_); | 4688 return OptimizedBit::decode(raw_ptr()->state_bits_); |
| 4689 } | 4689 } |
| 4690 void set_is_optimized(bool value) const; | 4690 void set_is_optimized(bool value) const; |
| 4691 bool is_alive() const { return AliveBit::decode(raw_ptr()->state_bits_); } | 4691 bool is_alive() const { return AliveBit::decode(raw_ptr()->state_bits_); } |
| 4692 void set_is_alive(bool value) const; | 4692 void set_is_alive(bool value) const; |
| 4693 | 4693 |
| 4694 uword PayloadStart() const { | 4694 uword PayloadStart() const { |
| 4695 const Instructions& instr = Instructions::Handle(instructions()); | 4695 return Instructions::PayloadStart(instructions()); |
| 4696 return instr.PayloadStart(); | |
| 4697 } | 4696 } |
| 4698 uword UncheckedEntryPoint() const { | 4697 uword UncheckedEntryPoint() const { |
| 4699 const Instructions& instr = Instructions::Handle(instructions()); | 4698 const Instructions& instr = Instructions::Handle(instructions()); |
| 4700 return instr.UncheckedEntryPoint(); | 4699 return instr.UncheckedEntryPoint(); |
| 4701 } | 4700 } |
| 4702 uword CheckedEntryPoint() const { | 4701 uword CheckedEntryPoint() const { |
| 4703 const Instructions& instr = Instructions::Handle(instructions()); | 4702 const Instructions& instr = Instructions::Handle(instructions()); |
| 4704 return instr.CheckedEntryPoint(); | 4703 return instr.CheckedEntryPoint(); |
| 4705 } | 4704 } |
| 4706 intptr_t Size() const { | 4705 intptr_t Size() const { return Instructions::Size(instructions()); } |
| 4707 const Instructions& instr = Instructions::Handle(instructions()); | |
| 4708 return instr.Size(); | |
| 4709 } | |
| 4710 RawObjectPool* GetObjectPool() const { return object_pool(); } | 4706 RawObjectPool* GetObjectPool() const { return object_pool(); } |
| 4711 bool ContainsInstructionAt(uword addr) const { | 4707 bool ContainsInstructionAt(uword addr) const { |
| 4712 const Instructions& instr = Instructions::Handle(instructions()); | 4708 const Instructions& instr = Instructions::Handle(instructions()); |
| 4713 const uword offset = addr - instr.PayloadStart(); | 4709 const uword offset = addr - instr.PayloadStart(); |
| 4714 return offset < static_cast<uword>(instr.Size()); | 4710 return offset < static_cast<uword>(instr.Size()); |
| 4715 } | 4711 } |
| 4716 | 4712 |
| 4717 // Returns true if there is a debugger breakpoint set in this code object. | 4713 // Returns true if there is a debugger breakpoint set in this code object. |
| 4718 bool HasBreakpoint() const; | 4714 bool HasBreakpoint() const; |
| 4719 | 4715 |
| (...skipping 4302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9022 | 9018 |
| 9023 inline void TypeArguments::SetHash(intptr_t value) const { | 9019 inline void TypeArguments::SetHash(intptr_t value) const { |
| 9024 // This is only safe because we create a new Smi, which does not cause | 9020 // This is only safe because we create a new Smi, which does not cause |
| 9025 // heap allocation. | 9021 // heap allocation. |
| 9026 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 9022 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
| 9027 } | 9023 } |
| 9028 | 9024 |
| 9029 } // namespace dart | 9025 } // namespace dart |
| 9030 | 9026 |
| 9031 #endif // RUNTIME_VM_OBJECT_H_ | 9027 #endif // RUNTIME_VM_OBJECT_H_ |
| OLD | NEW |