| 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 VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define 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 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2488 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; | 2488 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; |
| 2489 | 2489 |
| 2490 static intptr_t InstanceSize() { | 2490 static intptr_t InstanceSize() { |
| 2491 ASSERT(sizeof(RawCode) == OFFSET_OF(RawCode, data_)); | 2491 ASSERT(sizeof(RawCode) == OFFSET_OF(RawCode, data_)); |
| 2492 return 0; | 2492 return 0; |
| 2493 } | 2493 } |
| 2494 static intptr_t InstanceSize(intptr_t len) { | 2494 static intptr_t InstanceSize(intptr_t len) { |
| 2495 ASSERT(0 <= len && len <= kMaxElements); | 2495 ASSERT(0 <= len && len <= kMaxElements); |
| 2496 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement)); | 2496 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement)); |
| 2497 } | 2497 } |
| 2498 static RawCode* FinalizeCode(const Function& function, Assembler* assembler); | 2498 static RawCode* FinalizeCode(const Function& function, |
| 2499 static RawCode* FinalizeCode(const char* name, Assembler* assembler); | 2499 Assembler* assembler, |
| 2500 bool optimized = false); |
| 2501 static RawCode* FinalizeCode(const char* name, |
| 2502 Assembler* assembler, |
| 2503 bool optimized = false); |
| 2500 static RawCode* LookupCode(uword pc); | 2504 static RawCode* LookupCode(uword pc); |
| 2501 | 2505 |
| 2502 int32_t GetPointerOffsetAt(int index) const { | 2506 int32_t GetPointerOffsetAt(int index) const { |
| 2503 return *PointerOffsetAddrAt(index); | 2507 return *PointerOffsetAddrAt(index); |
| 2504 } | 2508 } |
| 2505 intptr_t GetTokenIndexOfPC(uword pc) const; | 2509 intptr_t GetTokenIndexOfPC(uword pc) const; |
| 2506 | 2510 |
| 2507 // Find pc, return 0 if not found. | 2511 // Find pc, return 0 if not found. |
| 2508 uword GetPatchCodePc() const; | 2512 uword GetPatchCodePc() const; |
| 2509 uword GetLazyDeoptPc() const; | 2513 uword GetLazyDeoptPc() const; |
| (...skipping 3227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5737 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5741 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5738 return false; | 5742 return false; |
| 5739 } | 5743 } |
| 5740 } | 5744 } |
| 5741 return true; | 5745 return true; |
| 5742 } | 5746 } |
| 5743 | 5747 |
| 5744 } // namespace dart | 5748 } // namespace dart |
| 5745 | 5749 |
| 5746 #endif // VM_OBJECT_H_ | 5750 #endif // VM_OBJECT_H_ |
| OLD | NEW |