| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 3fe65c4c15040dd73f6acad1b66af87c4ec1c9f2..9abfdab7124a6efe2db193975d5a654f2e9a9ba5 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -738,6 +738,9 @@ bool Object::IsTransitionArray() const {
|
| bool Object::IsTypeFeedbackVector() const { return IsFixedArray(); }
|
|
|
|
|
| +bool Object::IsLiteralsArray() const { return IsFixedArray(); }
|
| +
|
| +
|
| bool Object::IsDeoptimizationInputData() const {
|
| // Must be a fixed array.
|
| if (!IsFixedArray()) return false;
|
| @@ -3469,6 +3472,35 @@ void DeoptimizationOutputData::SetPcAndState(int index, Smi* offset) {
|
| }
|
|
|
|
|
| +LiteralsArray* LiteralsArray::cast(Object* object) {
|
| + SLOW_DCHECK(object->IsLiteralsArray());
|
| + return reinterpret_cast<LiteralsArray*>(object);
|
| +}
|
| +
|
| +
|
| +TypeFeedbackVector* LiteralsArray::feedback_vector() const {
|
| + return TypeFeedbackVector::cast(get(kVectorIndex));
|
| +}
|
| +
|
| +
|
| +void LiteralsArray::set_feedback_vector(TypeFeedbackVector* vector) {
|
| + set(kVectorIndex, vector);
|
| +}
|
| +
|
| +
|
| +Object* LiteralsArray::literal(int literal_index) const {
|
| + return get(kFirstLiteralIndex + literal_index);
|
| +}
|
| +
|
| +
|
| +void LiteralsArray::set_literal(int literal_index, Object* literal) {
|
| + set(kFirstLiteralIndex + literal_index, literal);
|
| +}
|
| +
|
| +
|
| +int LiteralsArray::literals_count() const { return length() - 1; }
|
| +
|
| +
|
| void HandlerTable::SetRangeStart(int index, int value) {
|
| set(index * kRangeEntrySize + kRangeStartIndex, Smi::FromInt(value));
|
| }
|
| @@ -6273,13 +6305,13 @@ bool JSFunction::has_simple_parameters() {
|
| }
|
|
|
|
|
| -FixedArray* JSFunction::literals() {
|
| +LiteralsArray* JSFunction::literals() {
|
| DCHECK(!shared()->bound());
|
| - return literals_or_bindings();
|
| + return LiteralsArray::cast(literals_or_bindings());
|
| }
|
|
|
|
|
| -void JSFunction::set_literals(FixedArray* literals) {
|
| +void JSFunction::set_literals(LiteralsArray* literals) {
|
| DCHECK(!shared()->bound());
|
| set_literals_or_bindings(literals);
|
| }
|
|
|