OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 6676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6687 static const int kEntriesStart = 1; | 6687 static const int kEntriesStart = 1; |
6688 static const int kContextOffset = 0; | 6688 static const int kContextOffset = 0; |
6689 static const int kCachedCodeOffset = 1; | 6689 static const int kCachedCodeOffset = 1; |
6690 static const int kLiteralsOffset = 2; | 6690 static const int kLiteralsOffset = 2; |
6691 static const int kOsrAstIdOffset = 3; | 6691 static const int kOsrAstIdOffset = 3; |
6692 static const int kEntryLength = 4; | 6692 static const int kEntryLength = 4; |
6693 static const int kInitialLength = kEntriesStart + kEntryLength; | 6693 static const int kInitialLength = kEntriesStart + kEntryLength; |
6694 | 6694 |
6695 static const int kNotFound = -1; | 6695 static const int kNotFound = -1; |
6696 | 6696 |
| 6697 // Helpers for assembly code that does a backwards walk of the optimized code |
| 6698 // map. |
| 6699 static const int kOffsetToPreviousContext = |
| 6700 FixedArray::kHeaderSize + kPointerSize * (kContextOffset - kEntryLength); |
| 6701 static const int kOffsetToPreviousCachedCode = |
| 6702 FixedArray::kHeaderSize + |
| 6703 kPointerSize * (kCachedCodeOffset - kEntryLength); |
| 6704 static const int kOffsetToPreviousLiterals = |
| 6705 FixedArray::kHeaderSize + kPointerSize * (kLiteralsOffset - kEntryLength); |
| 6706 static const int kOffsetToPreviousOsrAstId = |
| 6707 FixedArray::kHeaderSize + kPointerSize * (kOsrAstIdOffset - kEntryLength); |
| 6708 |
6697 // [scope_info]: Scope info. | 6709 // [scope_info]: Scope info. |
6698 DECL_ACCESSORS(scope_info, ScopeInfo) | 6710 DECL_ACCESSORS(scope_info, ScopeInfo) |
6699 | 6711 |
6700 // [construct stub]: Code stub for constructing instances of this function. | 6712 // [construct stub]: Code stub for constructing instances of this function. |
6701 DECL_ACCESSORS(construct_stub, Code) | 6713 DECL_ACCESSORS(construct_stub, Code) |
6702 | 6714 |
6703 // Returns if this function has been compiled to native code yet. | 6715 // Returns if this function has been compiled to native code yet. |
6704 inline bool is_compiled(); | 6716 inline bool is_compiled(); |
6705 | 6717 |
6706 // [length]: The function length - usually the number of declared parameters. | 6718 // [length]: The function length - usually the number of declared parameters. |
(...skipping 4061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10768 } | 10780 } |
10769 return value; | 10781 return value; |
10770 } | 10782 } |
10771 }; | 10783 }; |
10772 | 10784 |
10773 | 10785 |
10774 } // NOLINT, false-positive due to second-order macros. | 10786 } // NOLINT, false-positive due to second-order macros. |
10775 } // NOLINT, false-positive due to second-order macros. | 10787 } // NOLINT, false-positive due to second-order macros. |
10776 | 10788 |
10777 #endif // V8_OBJECTS_H_ | 10789 #endif // V8_OBJECTS_H_ |
OLD | NEW |