| 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 4735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4746 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; | 4746 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; |
| 4747 | 4747 |
| 4748 static intptr_t InstanceSize() { | 4748 static intptr_t InstanceSize() { |
| 4749 ASSERT(sizeof(RawCode) == OFFSET_OF_RETURNED_VALUE(RawCode, data)); | 4749 ASSERT(sizeof(RawCode) == OFFSET_OF_RETURNED_VALUE(RawCode, data)); |
| 4750 return 0; | 4750 return 0; |
| 4751 } | 4751 } |
| 4752 static intptr_t InstanceSize(intptr_t len) { | 4752 static intptr_t InstanceSize(intptr_t len) { |
| 4753 ASSERT(0 <= len && len <= kMaxElements); | 4753 ASSERT(0 <= len && len <= kMaxElements); |
| 4754 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement)); | 4754 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement)); |
| 4755 } | 4755 } |
| 4756 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 4756 static RawCode* FinalizeCode(const Function& function, | 4757 static RawCode* FinalizeCode(const Function& function, |
| 4757 Assembler* assembler, | 4758 Assembler* assembler, |
| 4758 bool optimized = false); | 4759 bool optimized = false); |
| 4759 static RawCode* FinalizeCode(const char* name, | 4760 static RawCode* FinalizeCode(const char* name, |
| 4760 Assembler* assembler, | 4761 Assembler* assembler, |
| 4761 bool optimized); | 4762 bool optimized); |
| 4763 #endif |
| 4762 static RawCode* LookupCode(uword pc); | 4764 static RawCode* LookupCode(uword pc); |
| 4763 static RawCode* LookupCodeInVmIsolate(uword pc); | 4765 static RawCode* LookupCodeInVmIsolate(uword pc); |
| 4764 static RawCode* FindCode(uword pc, int64_t timestamp); | 4766 static RawCode* FindCode(uword pc, int64_t timestamp); |
| 4765 | 4767 |
| 4766 int32_t GetPointerOffsetAt(int index) const { | 4768 int32_t GetPointerOffsetAt(int index) const { |
| 4767 NoSafepointScope no_safepoint; | 4769 NoSafepointScope no_safepoint; |
| 4768 return *PointerOffsetAddrAt(index); | 4770 return *PointerOffsetAddrAt(index); |
| 4769 } | 4771 } |
| 4770 TokenPosition GetTokenIndexOfPC(uword pc) const; | 4772 TokenPosition GetTokenIndexOfPC(uword pc) const; |
| 4771 | 4773 |
| (...skipping 4233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9005 | 9007 |
| 9006 inline void TypeArguments::SetHash(intptr_t value) const { | 9008 inline void TypeArguments::SetHash(intptr_t value) const { |
| 9007 // This is only safe because we create a new Smi, which does not cause | 9009 // This is only safe because we create a new Smi, which does not cause |
| 9008 // heap allocation. | 9010 // heap allocation. |
| 9009 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 9011 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
| 9010 } | 9012 } |
| 9011 | 9013 |
| 9012 } // namespace dart | 9014 } // namespace dart |
| 9013 | 9015 |
| 9014 #endif // RUNTIME_VM_OBJECT_H_ | 9016 #endif // RUNTIME_VM_OBJECT_H_ |
| OLD | NEW |