-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update Symbol finalzer and description getter methods #1297
Conversation
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.
Just some minor things.
src/builtins/BuiltinSymbol.cpp
Outdated
// If description is undefined, let descString be undefined. | ||
if (!(argc == 0 || argv[0].isUndefined())) { | ||
// NOTE) we represent `undefined` as nullptr here |
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.
Typo: (NOTE)
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.
Thank you for the review. fixed it.
src/runtime/Symbol.h
Outdated
{ | ||
// nullptr of desc represents `undefined` |
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.
I would add this comment to the member
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.
fix it too
{ | ||
return m_description; | ||
ASSERT(!!m_finalizerData); |
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.
I don't see a hasFinalizerData
, is there a way to check this somehow?
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.
This removeFinalizer
will be called when it has a valid data by GC (it is guaranteed)
|
||
for (size_t i = 0; i < list.size(); i++) { | ||
// If SameValue(e.[[Symbol]], sym) is true, return e.[[Key]]. | ||
if (list[i].symbol == sym) { |
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.
Maybe it is defined in the specification, but is it true that always maximum of one result is possible?
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.
Yes, only one unique Symbol (with each Symbol description) will be registered according to the spec.
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
No description provided.