-
Notifications
You must be signed in to change notification settings - Fork 1.2k
SharedArrayBuffer - Initial work. #1533
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
Conversation
I'll take a look at the Ubuntu failures. I haven't made any effort to have this x-plat in this V1 implementation but it should just clean build everywhere. |
@@ -783,6 +784,14 @@ PHASE(All) | |||
#define FLAGPR(Type, ParentName, Name, String, Default) FLAG(Type, Name, String, Default, ParentName, FALSE) | |||
#define FLAGR(Type, Name, String, Default) FLAG(Type, Name, String, Default, NoParent, FALSE) | |||
|
|||
// Release flags with paraent and acronym |
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.
paraent [](start = 22, length = 7)
parent #Resolved
|
Thanks @agarwal-sandeep for having a look. |
How does perf compare? #Resolved |
return JavascriptConversion::ToUInt32(length, scriptContext); | ||
} | ||
|
||
Var SharedArrayBuffer::NewInstance(RecyclableObject* function, CallInfo callInfo, ...) |
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.
NewInstance [](start = 27, length = 11)
This and several others are almost identical to their ArrayBuffer counterparts. Is it better to re-factor them into ArrayBufferBase?
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.
There are few subtle differences in these functions. I feel like it is best to keep them separate as the spec could evolve and it would be easier to make those changes. Majority of this functions are input validation. I could make them a common macro.
In reply to: 77910245 [](ancestors = 77910245)
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.
Would template usage help?
I don't expect anything to change perf-wise (why do you there will be perf related issue), but I'll run just in case. In reply to: 245406564 [](ancestors = 245406564) |
I ran it and it is flat. In reply to: 245458779 [](ancestors = 245458779,245406564) |
@@ -357,3 +357,10 @@ RT_ERROR_MSG(JSERR_InvalidHint, 5658, "%s: invalid hint", "invalid hint", kjstTy | |||
|
|||
RT_ERROR_MSG(JSERR_This_NeedNamespace, 5659, "%s: 'this' is not a Module Namespace object", "Module Namespace object expected", kjstTypeError, JSERR_This_NeedNamespace) // {Locked="\'this\'"} | |||
RT_ERROR_MSG(JSERR_This_NeedListIterator, 5660, "%s: 'this' is not a List Iterator object", "List Iterator expected", kjstTypeError, 0) | |||
RT_ERROR_MSG(JSERR_NeedSharedArrayBufferObject, 5661, "%s is not a SharedArrayBuffer", "SharedArrayBuffer object expected", kjstTypeError, 0) | |||
|
|||
RT_ERROR_MSG(JSERR_Function_LessArguments, 5662, "Function '%s' is called with less arguments", "Function called with less arguments", kjstRangeError, 0) |
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.
Is the intention here 'not enough arguments'? I would reword it. Perhaps we can use the existing RT_ERROR_MSG(JSERR_WinRTFunction_TooFewArguments, 5102, "%s: function called with too few arguments", "Function called with too few arguments", kjstError, 0)
@digitalinfinity can you look at the pal changes? thanks, |
PAL changes LGTM |
This work is to implement a prototype version of the `SharedArrayBuffer`. The spec is in the stage2. The `SharedArrayBuffer` is behind the `ESSharedArrayBuffer` (or -sab) flag. Highlights. Introduce the `SharedArrayBuffer` type and its implementation. Refactor the `ArrayBuffer` to a common class (`ArrayBufferBase`) so that both `SharedArrayBuffer` and `ArrayBuffer` leverage the common functionality and machinery. `Atomics` object (spec'ed) is introduced to provide the atomic operation on the buffer which is shared. Currently it is using the Win32 based APIs to provide the functionality. All 12 methods of `Atomics` are implemented. All `TypedArray` views are changed to make use of `SharedArrayBuffer` as well. The `Serialization/Deserialization` implementation is in the different repo. Added test cases to validate most of the functionality. sharedarraybuffer - initial work
Merge pull request #1533 from akroshg:sab This work is to implement a prototype version of the `SharedArrayBuffer`. The spec is in the stage2. The `SharedArrayBuffer` is behind the `ESSharedArrayBuffer` (or -sab) flag. Highlights. Introduce the `SharedArrayBuffer` type and its implementation. Refactor the `ArrayBuffer` to a common class (`ArrayBufferBase`) so that both `SharedArrayBuffer` and `ArrayBuffer` leverage the common functionality and machinery. `Atomics` object (spec'ed) is introduced to provide the atomic operation on the buffer which is shared. Currently it is using the Win32 based APIs to provide the functionality. All 12 methods of `Atomics` are implemented. All `TypedArray` views are changed to make use of `SharedArrayBuffer` as well. The `Serialization/Deserialization` implementation is in the different repo. Added test cases to validate most of the functionality. sharedarraybuffer - initial work
This work is to implement a prototype version of the
SharedArrayBuffer
. The spec is in the stage2.The
SharedArrayBuffer
is behind theESSharedArrayBuffer
(or -sab)flag.
Highlights.
Introduce the
SharedArrayBuffer
type and its implementation.Refactor the
ArrayBuffer
to a common class (ArrayBufferBase
) so that bothSharedArrayBuffer
andArrayBuffer
leverage the common functionality and machinery.Atomics
object (spec'ed) is introduced to provide the atomic operation on the bufferwhich is shared. Currently it is using the Win32 based APIs to provide the
functionality.
All 12 methods of
Atomics
are implemented.All
TypedArray
views are changed to make use ofSharedArrayBuffer
as well.The
Serialization/Deserialization
implementation is in the differentrepo.
Added test cases to validate most of the functionality. sharedarraybuffer - initial work