Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index e1a44e746106e5aebd5b4819b08cd542c4f4ccdd..a957ff815e79edc12d4be45bc246cd97c7e824de 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -5748,6 +5748,26 @@ void SharedFunctionInfo::set_kind(FunctionKind kind) { |
| set_compiler_hints(hints); |
| } |
| +// static |
| +int SharedFunctionInfo::OffsetToPreviousContext() { |
| + return FixedArray::kHeaderSize + |
|
Michael Starzinger
2016/04/08 12:44:02
These can all be statically computed, can we make
mvstanton
2016/04/11 13:36:14
Absolutely, much better, done.
|
| + kPointerSize * (kContextOffset - kEntryLength); |
| +} |
| + |
| +int SharedFunctionInfo::OffsetToPreviousCachedCode() { |
| + return FixedArray::kHeaderSize + |
| + kPointerSize * (kCachedCodeOffset - kEntryLength); |
| +} |
| + |
| +int SharedFunctionInfo::OffsetToPreviousLiterals() { |
| + return FixedArray::kHeaderSize + |
| + kPointerSize * (kLiteralsOffset - kEntryLength); |
| +} |
| + |
| +int SharedFunctionInfo::OffsetToPreviousOsrAstId() { |
| + return FixedArray::kHeaderSize + |
| + kPointerSize * (kOsrAstIdOffset - kEntryLength); |
| +} |
| BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, needs_home_object, |
| kNeedsHomeObject) |