| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 4f73eb42e7a057a77db18a8af84dd7a98773b508..d7ac24129ac5517458aeb36114f14c92897150fa 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -875,16 +875,23 @@ class AccessorPair;
|
| class AllocationSite;
|
| class AllocationSiteCreationContext;
|
| class AllocationSiteUsageContext;
|
| +class Cell;
|
| class ConsString;
|
| class DictionaryElementsAccessor;
|
| class ElementsAccessor;
|
| class FixedArrayBase;
|
| class FunctionLiteral;
|
| class GlobalObject;
|
| +class JSBuiltinsObject;
|
| class LayoutDescriptor;
|
| class LookupIterator;
|
| +class ObjectHashTable;
|
| class ObjectVisitor;
|
| +class PropertyCell;
|
| +class SafepointEntry;
|
| +class SharedFunctionInfo;
|
| class StringStream;
|
| +class TypeFeedbackInfo;
|
| class TypeFeedbackVector;
|
| class WeakCell;
|
|
|
| @@ -1733,9 +1740,6 @@ class JSReceiver: public HeapObject {
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver);
|
| };
|
|
|
| -// Forward declaration for JSObject::GetOrCreateHiddenPropertiesHashTable.
|
| -class ObjectHashTable;
|
| -
|
|
|
| // The JSObject describes real heap allocated JavaScript objects with
|
| // properties.
|
| @@ -4883,12 +4887,6 @@ class HandlerTable : public FixedArray {
|
| };
|
|
|
|
|
| -// Forward declaration.
|
| -class Cell;
|
| -class PropertyCell;
|
| -class SafepointEntry;
|
| -class TypeFeedbackInfo;
|
| -
|
| // Code describes objects with on-the-fly generated machine code.
|
| class Code: public HeapObject {
|
| public:
|
| @@ -6456,6 +6454,10 @@ class Script: public Struct {
|
| // function from which eval was called where eval was called.
|
| DECL_ACCESSORS(eval_from_instructions_offset, Smi)
|
|
|
| + // [shared_function_infos]: weak fixed array containing all shared
|
| + // function infos created from this script.
|
| + DECL_ACCESSORS(shared_function_infos, Object)
|
| +
|
| // [flags]: Holds an exciting bitfield.
|
| DECL_ACCESSORS(flags, Smi)
|
|
|
| @@ -6503,6 +6505,10 @@ class Script: public Struct {
|
| // Get the JS object wrapping the given script; create it if none exists.
|
| static Handle<JSObject> GetWrapper(Handle<Script> script);
|
|
|
| + // Look through the list of existing shared function infos to find one
|
| + // that matches the function literal. Return empty handle if not found.
|
| + MaybeHandle<SharedFunctionInfo> FindSharedFunctionInfo(FunctionLiteral* fun);
|
| +
|
| // Dispatched behavior.
|
| DECLARE_PRINTER(Script)
|
| DECLARE_VERIFIER(Script)
|
| @@ -6519,8 +6525,9 @@ class Script: public Struct {
|
| static const int kEvalFromSharedOffset = kIdOffset + kPointerSize;
|
| static const int kEvalFrominstructionsOffsetOffset =
|
| kEvalFromSharedOffset + kPointerSize;
|
| - static const int kFlagsOffset =
|
| + static const int kSharedFunctionInfosOffset =
|
| kEvalFrominstructionsOffsetOffset + kPointerSize;
|
| + static const int kFlagsOffset = kSharedFunctionInfosOffset + kPointerSize;
|
| static const int kSourceUrlOffset = kFlagsOffset + kPointerSize;
|
| static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize;
|
| static const int kSize = kSourceMappingUrlOffset + kPointerSize;
|
| @@ -6651,6 +6658,11 @@ class SharedFunctionInfo: public HeapObject {
|
| Handle<FixedArray> literals,
|
| BailoutId osr_ast_id);
|
|
|
| + // Set up the link between shared function info and the script. The shared
|
| + // function info is added to the list on the script.
|
| + static void SetScript(Handle<SharedFunctionInfo> shared,
|
| + Handle<Object> script_object);
|
| +
|
| // Layout description of the optimized code map.
|
| static const int kNextMapIndex = 0;
|
| static const int kEntriesStart = 1;
|
| @@ -7534,9 +7546,6 @@ class JSGlobalProxy : public JSObject {
|
| };
|
|
|
|
|
| -// Forward declaration.
|
| -class JSBuiltinsObject;
|
| -
|
| // Common super class for JavaScript global objects and the special
|
| // builtins global objects.
|
| class GlobalObject: public JSObject {
|
|
|