-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Share SimpleTypeHandler types on function objects. #4748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,15 +67,9 @@ namespace Js | |
|
||
friend class JavascriptArray; // for xplat offsetof field access | ||
friend class JavascriptNativeArray; // for xplat offsetof field access | ||
friend class JavascriptOperators; // for ReplaceType | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the xplat builds are failing because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True. So the different compilers are enforcing different rules? |
||
friend class PathTypeHandlerBase; // for ReplaceType | ||
friend class SimplePathTypeHandlerNoAttr; | ||
friend class SimplePathTypeHandlerWithAttr; | ||
friend class PathTypeHandlerNoAttr; | ||
friend class JavascriptLibrary; // for ReplaceType | ||
friend class ScriptFunction; // for ReplaceType; | ||
friend class JSON::JSONParser; //for ReplaceType | ||
friend class ModuleNamespace; // for slot setting. | ||
friend class JavascriptOperators; | ||
friend class JavascriptLibrary; | ||
friend class ModuleNamespace; // for slot setting. | ||
|
||
#if ENABLE_OBJECT_SOURCE_TRACKING | ||
public: | ||
|
@@ -111,8 +105,6 @@ namespace Js | |
|
||
void InitSlots(DynamicObject * instance, ScriptContext * scriptContext); | ||
void SetTypeHandler(DynamicTypeHandler * typeHandler, bool hasChanged); | ||
void ReplaceType(DynamicType * type); | ||
void ReplaceTypeWithPredecessorType(DynamicType * previousType); | ||
|
||
protected: | ||
DEFINE_VTABLE_CTOR(DynamicObject, RecyclableObject); | ||
|
@@ -138,6 +130,8 @@ namespace Js | |
|
||
void EnsureSlots(int oldCount, int newCount, ScriptContext * scriptContext, DynamicTypeHandler * newTypeHandler = nullptr); | ||
void EnsureSlots(int newCount, ScriptContext *scriptContext); | ||
void ReplaceType(DynamicType * type); | ||
void ReplaceTypeWithPredecessorType(DynamicType * previousType); | ||
|
||
DynamicTypeHandler * GetTypeHandler() const; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm misreading something, isn't this changing the semantics? Previously we were only setting writable to false, now we'll be setting enumerable and configurable to false as well, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've always set the attributes this way for the prototype property of a class constructor. (See the class member defaults.)