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 5249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5260 // Returns the object size for a given body (used for allocation). | 5260 // Returns the object size for a given body (used for allocation). |
5261 static int SizeFor(int body_size) { | 5261 static int SizeFor(int body_size) { |
5262 DCHECK_SIZE_TAG_ALIGNED(body_size); | 5262 DCHECK_SIZE_TAG_ALIGNED(body_size); |
5263 return RoundUp(kHeaderSize + body_size, kCodeAlignment); | 5263 return RoundUp(kHeaderSize + body_size, kCodeAlignment); |
5264 } | 5264 } |
5265 | 5265 |
5266 // Calculate the size of the code object to report for log events. This takes | 5266 // Calculate the size of the code object to report for log events. This takes |
5267 // the layout of the code object into account. | 5267 // the layout of the code object into account. |
5268 inline int ExecutableSize(); | 5268 inline int ExecutableSize(); |
5269 | 5269 |
5270 // Locating source position. | |
5271 int SourcePosition(int code_offset); | |
5272 int SourceStatementPosition(int code_offset); | |
5273 | |
5274 DECLARE_CAST(Code) | 5270 DECLARE_CAST(Code) |
5275 | 5271 |
5276 // Dispatched behavior. | 5272 // Dispatched behavior. |
5277 inline int CodeSize(); | 5273 inline int CodeSize(); |
5278 | 5274 |
5279 DECLARE_PRINTER(Code) | 5275 DECLARE_PRINTER(Code) |
5280 DECLARE_VERIFIER(Code) | 5276 DECLARE_VERIFIER(Code) |
5281 | 5277 |
5282 void ClearInlineCaches(); | 5278 void ClearInlineCaches(); |
5283 | 5279 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5490 | 5486 |
5491 // Returns the address of the first instruction. | 5487 // Returns the address of the first instruction. |
5492 inline Address instruction_start(); | 5488 inline Address instruction_start(); |
5493 | 5489 |
5494 // Returns the address right after the last instruction. | 5490 // Returns the address right after the last instruction. |
5495 inline Address instruction_end(); | 5491 inline Address instruction_end(); |
5496 | 5492 |
5497 // Returns the size of the code instructions. | 5493 // Returns the size of the code instructions. |
5498 inline int instruction_size(); | 5494 inline int instruction_size(); |
5499 | 5495 |
| 5496 // Return the source position table. |
| 5497 inline ByteArray* source_position_table(); |
| 5498 |
5500 // Returns the size of instructions and the metadata. | 5499 // Returns the size of instructions and the metadata. |
5501 inline int SizeIncludingMetadata(); | 5500 inline int SizeIncludingMetadata(); |
5502 | 5501 |
5503 // Returns true if pc is inside this object's instructions. | 5502 // Returns true if pc is inside this object's instructions. |
5504 inline bool contains(byte* pc); | 5503 inline bool contains(byte* pc); |
5505 | 5504 |
5506 // Returns the AbstractCode::Kind of the code. | 5505 // Returns the AbstractCode::Kind of the code. |
5507 inline Kind kind(); | 5506 inline Kind kind(); |
5508 | 5507 |
5509 // Calculate the size of the code object to report for log events. This takes | 5508 // Calculate the size of the code object to report for log events. This takes |
(...skipping 5412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10922 } | 10921 } |
10923 return value; | 10922 return value; |
10924 } | 10923 } |
10925 }; | 10924 }; |
10926 | 10925 |
10927 | 10926 |
10928 } // NOLINT, false-positive due to second-order macros. | 10927 } // NOLINT, false-positive due to second-order macros. |
10929 } // NOLINT, false-positive due to second-order macros. | 10928 } // NOLINT, false-positive due to second-order macros. |
10930 | 10929 |
10931 #endif // V8_OBJECTS_H_ | 10930 #endif // V8_OBJECTS_H_ |
OLD | NEW |