| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index b01f3301a2b5e9dc49c63ff2c699cb59c713dc62..c7d4808cf1ca0d039eaa4fbd61e4b5c20b3054ce 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -2258,6 +2258,16 @@ class Code: public HeapObject {
|
| return RoundUp(kHeaderSize + body_size + sinfo_size, kCodeAlignment);
|
| }
|
|
|
| + // Calculate the size of the code object to report for log events. This takes
|
| + // the layout of the code object into account.
|
| + int ExecutableSize() {
|
| + // Check that the assumptions about the layout of the code object holds.
|
| + ASSERT_EQ(reinterpret_cast<unsigned int>(instruction_start()) -
|
| + reinterpret_cast<unsigned int>(address()),
|
| + Code::kHeaderSize);
|
| + return instruction_size() + Code::kHeaderSize;
|
| + }
|
| +
|
| // Locating source position.
|
| int SourcePosition(Address pc);
|
| int SourceStatementPosition(Address pc);
|
|
|