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

Unified 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, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 6c209b179207407623aa850d85587528c23b0a1c..676182f03b54be5328014e82c53175ac372f8d41 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2216,8 +2216,13 @@ class JSObject: public JSReceiver {
// Get the header size for a JSObject. Used to compute the index of
// internal fields as well as the number of internal fields.
+ static inline int GetHeaderSize(InstanceType instance_type);
inline int GetHeaderSize();
+ // Get the size of the header with internal fields of a JSObject.
+ // Used to calculate the instance size.
+ static inline int GetHeaderWithInternalFieldsSize(InstanceType instance_type);
+
inline int GetInternalFieldCount();
inline int GetInternalFieldOffset(int index);
inline Object* GetInternalField(int index);
@@ -6786,10 +6791,10 @@ class SharedFunctionInfo: public HeapObject {
int SourceSize();
// Calculate the instance size.
- int CalculateInstanceSize();
+ int CalculateInstanceSize(InstanceType instance_type);
// Calculate the number of in-object properties.
- int CalculateInObjectProperties();
+ int CalculateInObjectProperties(InstanceType instance_type);
inline bool has_simple_parameters();
@@ -7286,6 +7291,8 @@ class JSFunction: public JSObject {
Handle<Object> prototype);
inline bool has_initial_map();
static void EnsureHasInitialMap(Handle<JSFunction> function);
+ static Handle<Map> EnsureDerivedHasInitialMap(
+ Handle<JSFunction> original_constructor, Handle<JSFunction> constructor);
// Get and set the prototype property on a JSFunction. If the
// function has an initial map the prototype is set on the initial
« 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