| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index aa9b0aea2680fb35df0047051ff723c30da179f9..7a7f5f89b9e82bdf18dc73b19c23c400cde1dcd5 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -4308,13 +4308,18 @@ class Code: public HeapObject {
|
| // [deoptimization_data]: Array containing data for deopt.
|
| DECL_ACCESSORS(deoptimization_data, FixedArray)
|
|
|
| - // [type_feedback_info]: Struct containing type feedback information.
|
| + // [type_feedback_info]: Struct containing type feedback information for
|
| + // unoptimized code. Optimized code can temporarily store the head of
|
| + // the list of the dependent optimized functions during deoptimization.
|
| // STUBs can use this slot to store arbitrary information as a Smi.
|
| - // Will contain either a TypeFeedbackInfo object, or undefined, or a Smi.
|
| + // Will contain either a TypeFeedbackInfo object, or JSFunction object,
|
| + // or undefined, or a Smi.
|
| DECL_ACCESSORS(type_feedback_info, Object)
|
| inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value);
|
| inline int stub_info();
|
| inline void set_stub_info(int info);
|
| + inline Object* deoptimizing_functions();
|
| + inline void set_deoptimizing_functions(Object* value);
|
|
|
| // [gc_metadata]: Field used to hold GC related metadata. The contents of this
|
| // field does not have to be traced during garbage collection since
|
| @@ -5184,8 +5189,7 @@ class Map: public HeapObject {
|
| kConstructorOffset + kPointerSize;
|
| static const int kDescriptorsOffset =
|
| kTransitionsOrBackPointerOffset + kPointerSize;
|
| - static const int kCodeCacheOffset =
|
| - kDescriptorsOffset + kPointerSize;
|
| + static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize;
|
| static const int kBitField3Offset = kCodeCacheOffset + kPointerSize;
|
| static const int kSize = kBitField3Offset + kPointerSize;
|
|
|
| @@ -6226,6 +6230,18 @@ class JSFunction: public JSObject {
|
| // Retrieve the native context from a function's literal array.
|
| static Context* NativeContextFromLiterals(FixedArray* literals);
|
|
|
| +#ifdef DEBUG
|
| + bool FunctionsInFunctionListShareSameCode() {
|
| + Object* current = this;
|
| + while (!current->IsUndefined()) {
|
| + JSFunction* function = JSFunction::cast(current);
|
| + current = function->next_function_link();
|
| + if (function->code() != this->code()) return false;
|
| + }
|
| + return true;
|
| + }
|
| +#endif
|
| +
|
| // Layout descriptors. The last property (from kNonWeakFieldsEndOffset to
|
| // kSize) is weak and has special handling during garbage collection.
|
| static const int kCodeEntryOffset = JSObject::kHeaderSize;
|
|
|