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

Unified Diff: src/objects.h

Issue 2095673002: Share SharedFunctionInfo between all functions created for a FunctionTemplateInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »
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 8d4ff2cdee8b0be1d5683252cfe2e3f4baa459f3..119a0af334ba863846df9e2d9f2ce617f42ba1c6 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -10524,6 +10524,7 @@ class FunctionTemplateInfo: public TemplateInfo {
DECL_ACCESSORS(signature, Object)
DECL_ACCESSORS(instance_call_handler, Object)
DECL_ACCESSORS(access_check_info, Object)
+ DECL_ACCESSORS(shared_function_info, Object)
DECL_INT_ACCESSORS(flag)
inline int length() const;
@@ -10538,7 +10539,6 @@ class FunctionTemplateInfo: public TemplateInfo {
DECL_BOOLEAN_ACCESSORS(read_only_prototype)
DECL_BOOLEAN_ACCESSORS(remove_prototype)
DECL_BOOLEAN_ACCESSORS(do_not_cache)
- DECL_BOOLEAN_ACCESSORS(instantiated)
DECL_BOOLEAN_ACCESSORS(accept_any_receiver)
DECLARE_CAST(FunctionTemplateInfo)
@@ -10563,13 +10563,18 @@ class FunctionTemplateInfo: public TemplateInfo {
static const int kInstanceCallHandlerOffset = kSignatureOffset + kPointerSize;
static const int kAccessCheckInfoOffset =
kInstanceCallHandlerOffset + kPointerSize;
- static const int kFlagOffset = kAccessCheckInfoOffset + kPointerSize;
+ static const int kSharedFunctionInfoOffset =
+ kAccessCheckInfoOffset + kPointerSize;
+ static const int kFlagOffset = kSharedFunctionInfoOffset + kPointerSize;
static const int kLengthOffset = kFlagOffset + kPointerSize;
static const int kSize = kLengthOffset + kPointerSize;
+ static Handle<SharedFunctionInfo> GetOrCreateSharedFunctionInfo(
+ Isolate* isolate, Handle<FunctionTemplateInfo> info);
// Returns true if |object| is an instance of this function template.
inline bool IsTemplateFor(JSObject* object);
bool IsTemplateFor(Map* map);
+ inline bool instantiated();
private:
// Bit position in the flag, from least significant bit position.
@@ -10579,8 +10584,7 @@ class FunctionTemplateInfo: public TemplateInfo {
static const int kReadOnlyPrototypeBit = 3;
static const int kRemovePrototypeBit = 4;
static const int kDoNotCacheBit = 5;
- static const int kInstantiatedBit = 6;
- static const int kAcceptAnyReceiver = 7;
+ static const int kAcceptAnyReceiver = 6;
DISALLOW_IMPLICIT_CONSTRUCTORS(FunctionTemplateInfo);
};
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698