| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 3625c0363d358c65c665b0a2b1f344e8ce9bc473..7b999f199868aa1b2e288debd88c9659ee1ed180 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -5403,11 +5403,37 @@ class Code: public HeapObject {
|
|
|
| class AbstractCode : public HeapObject {
|
| public:
|
| + // All code kinds and INTERPRETED_FUNCTION.
|
| + enum Kind {
|
| +#define DEFINE_CODE_KIND_ENUM(name) name,
|
| + CODE_KIND_LIST(DEFINE_CODE_KIND_ENUM)
|
| +#undef DEFINE_CODE_KIND_ENUM
|
| + INTERPRETED_FUNCTION,
|
| + };
|
| +
|
| int SourcePosition(int offset);
|
| int SourceStatementPosition(int offset);
|
|
|
| + // Returns the address of the first instruction.
|
| + inline Address instruction_start();
|
| +
|
| + // Returns the address right after the last instruction.
|
| + inline Address instruction_end();
|
| +
|
| + // Returns the of the code instructions.
|
| + inline int instruction_size();
|
| +
|
| + // Returns true if pc is inside this object's instructions.
|
| + inline bool contains(byte* pc);
|
| +
|
| + // Returns the AbstractCode::Kind of the code.
|
| + inline Kind kind();
|
| +
|
| + // Calculate the size of the code object to report for log events. This takes
|
| + // the layout of the code object into account.
|
| + inline int ExecutableSize();
|
| +
|
| DECLARE_CAST(AbstractCode)
|
| - inline int Size();
|
| inline Code* GetCode();
|
| inline BytecodeArray* GetBytecodeArray();
|
| };
|
| @@ -6605,6 +6631,10 @@ class SharedFunctionInfo: public HeapObject {
|
| // [code]: Function code.
|
| DECL_ACCESSORS(code, Code)
|
|
|
| + // Get the abstract code associated with the function, which will either be
|
| + // a Code object or a BytecodeArray.
|
| + inline AbstractCode* abstract_code();
|
| +
|
| inline void ReplaceCode(Code* code);
|
|
|
| // [optimized_code_map]: Map from native context to optimized code
|
| @@ -7437,6 +7467,10 @@ class JSFunction: public JSObject {
|
| inline void set_code_no_write_barrier(Code* code);
|
| inline void ReplaceCode(Code* code);
|
|
|
| + // Get the abstract code associated with the function, which will either be
|
| + // a Code object or a BytecodeArray.
|
| + inline AbstractCode* abstract_code();
|
| +
|
| // Tells whether this function inlines the given shared function info.
|
| bool Inlines(SharedFunctionInfo* candidate);
|
|
|
|
|