Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: src/objects.h

Issue 1427483002: [es6] Better support for built-ins subclassing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2209 // Support functions for v8 api (needed for correct interceptor behavior). 2209 // Support functions for v8 api (needed for correct interceptor behavior).
2210 MUST_USE_RESULT static Maybe<bool> HasRealNamedProperty( 2210 MUST_USE_RESULT static Maybe<bool> HasRealNamedProperty(
2211 Handle<JSObject> object, Handle<Name> name); 2211 Handle<JSObject> object, Handle<Name> name);
2212 MUST_USE_RESULT static Maybe<bool> HasRealElementProperty( 2212 MUST_USE_RESULT static Maybe<bool> HasRealElementProperty(
2213 Handle<JSObject> object, uint32_t index); 2213 Handle<JSObject> object, uint32_t index);
2214 MUST_USE_RESULT static Maybe<bool> HasRealNamedCallbackProperty( 2214 MUST_USE_RESULT static Maybe<bool> HasRealNamedCallbackProperty(
2215 Handle<JSObject> object, Handle<Name> name); 2215 Handle<JSObject> object, Handle<Name> name);
2216 2216
2217 // Get the header size for a JSObject. Used to compute the index of 2217 // Get the header size for a JSObject. Used to compute the index of
2218 // internal fields as well as the number of internal fields. 2218 // internal fields as well as the number of internal fields.
2219 static inline int GetHeaderSize(InstanceType instance_type);
2219 inline int GetHeaderSize(); 2220 inline int GetHeaderSize();
2220 2221
2222 // Get the size of the header with internal fields of a JSObject.
2223 // Used to calculate the instance size.
2224 static inline int GetHeaderWithInternalFieldsSize(InstanceType instance_type);
2225
2221 inline int GetInternalFieldCount(); 2226 inline int GetInternalFieldCount();
2222 inline int GetInternalFieldOffset(int index); 2227 inline int GetInternalFieldOffset(int index);
2223 inline Object* GetInternalField(int index); 2228 inline Object* GetInternalField(int index);
2224 inline void SetInternalField(int index, Object* value); 2229 inline void SetInternalField(int index, Object* value);
2225 inline void SetInternalField(int index, Smi* value); 2230 inline void SetInternalField(int index, Smi* value);
2226 2231
2227 // Returns the number of properties on this object filtering out properties 2232 // Returns the number of properties on this object filtering out properties
2228 // with the specified attributes (ignoring interceptors). 2233 // with the specified attributes (ignoring interceptors).
2229 int NumberOfOwnProperties(PropertyAttributes filter = NONE); 2234 int NumberOfOwnProperties(PropertyAttributes filter = NONE);
2230 // Fill in details for properties into storage starting at the specified 2235 // Fill in details for properties into storage starting at the specified
(...skipping 4548 matching lines...) Expand 10 before | Expand all | Expand 10 after
6779 // Whether this function is defined in native code or extensions. 6784 // Whether this function is defined in native code or extensions.
6780 inline bool IsBuiltin(); 6785 inline bool IsBuiltin();
6781 6786
6782 // Check whether or not this function is inlineable. 6787 // Check whether or not this function is inlineable.
6783 bool IsInlineable(); 6788 bool IsInlineable();
6784 6789
6785 // Source size of this function. 6790 // Source size of this function.
6786 int SourceSize(); 6791 int SourceSize();
6787 6792
6788 // Calculate the instance size. 6793 // Calculate the instance size.
6789 int CalculateInstanceSize(); 6794 int CalculateInstanceSize(InstanceType instance_type);
6790 6795
6791 // Calculate the number of in-object properties. 6796 // Calculate the number of in-object properties.
6792 int CalculateInObjectProperties(); 6797 int CalculateInObjectProperties(InstanceType instance_type);
6793 6798
6794 inline bool has_simple_parameters(); 6799 inline bool has_simple_parameters();
6795 6800
6796 // Initialize a SharedFunctionInfo from a parsed function literal. 6801 // Initialize a SharedFunctionInfo from a parsed function literal.
6797 static void InitFromFunctionLiteral(Handle<SharedFunctionInfo> shared_info, 6802 static void InitFromFunctionLiteral(Handle<SharedFunctionInfo> shared_info,
6798 FunctionLiteral* lit); 6803 FunctionLiteral* lit);
6799 6804
6800 // Dispatched behavior. 6805 // Dispatched behavior.
6801 DECLARE_PRINTER(SharedFunctionInfo) 6806 DECLARE_PRINTER(SharedFunctionInfo)
6802 DECLARE_VERIFIER(SharedFunctionInfo) 6807 DECLARE_VERIFIER(SharedFunctionInfo)
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
7279 7284
7280 inline BindingsArray* function_bindings(); 7285 inline BindingsArray* function_bindings();
7281 inline void set_function_bindings(BindingsArray* bindings); 7286 inline void set_function_bindings(BindingsArray* bindings);
7282 7287
7283 // The initial map for an object created by this constructor. 7288 // The initial map for an object created by this constructor.
7284 inline Map* initial_map(); 7289 inline Map* initial_map();
7285 static void SetInitialMap(Handle<JSFunction> function, Handle<Map> map, 7290 static void SetInitialMap(Handle<JSFunction> function, Handle<Map> map,
7286 Handle<Object> prototype); 7291 Handle<Object> prototype);
7287 inline bool has_initial_map(); 7292 inline bool has_initial_map();
7288 static void EnsureHasInitialMap(Handle<JSFunction> function); 7293 static void EnsureHasInitialMap(Handle<JSFunction> function);
7294 static Handle<Map> EnsureDerivedHasInitialMap(
7295 Handle<JSFunction> original_constructor, Handle<JSFunction> constructor);
7289 7296
7290 // Get and set the prototype property on a JSFunction. If the 7297 // Get and set the prototype property on a JSFunction. If the
7291 // function has an initial map the prototype is set on the initial 7298 // function has an initial map the prototype is set on the initial
7292 // map. Otherwise, the prototype is put in the initial map field 7299 // map. Otherwise, the prototype is put in the initial map field
7293 // until an initial map is needed. 7300 // until an initial map is needed.
7294 inline bool has_prototype(); 7301 inline bool has_prototype();
7295 inline bool has_instance_prototype(); 7302 inline bool has_instance_prototype();
7296 inline Object* prototype(); 7303 inline Object* prototype();
7297 inline Object* instance_prototype(); 7304 inline Object* instance_prototype();
7298 static void SetPrototype(Handle<JSFunction> function, 7305 static void SetPrototype(Handle<JSFunction> function,
(...skipping 3481 matching lines...) Expand 10 before | Expand all | Expand 10 after
10780 // (elements + properties) in the current level. 10787 // (elements + properties) in the current level.
10781 int levelLength_; 10788 int levelLength_;
10782 10789
10783 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); 10790 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator);
10784 }; 10791 };
10785 10792
10786 } // NOLINT, false-positive due to second-order macros. 10793 } // NOLINT, false-positive due to second-order macros.
10787 } // NOLINT, false-positive due to second-order macros. 10794 } // NOLINT, false-positive due to second-order macros.
10788 10795
10789 #endif // V8_OBJECTS_H_ 10796 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698