Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test262
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pmaksimo
test262
Commits
abc4dfae
Commit
abc4dfae
authored
8 years ago
by
Lars T Hansen
Committed by
Leo Balter
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Account for the use of ToIndex in Atomic operations (#870)
Ref tc39/ecma262#807
parent
e262dcd0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
harness/testAtomics.js
+10
-6
10 additions, 6 deletions
harness/testAtomics.js
with
10 additions
and
6 deletions
harness/testAtomics.js
+
10
−
6
View file @
abc4dfae
...
...
@@ -13,13 +13,8 @@ function testWithAtomicsOutOfBoundsIndices(f) {
(
view
)
=>
-
1
,
(
view
)
=>
view
.
length
,
(
view
)
=>
view
.
length
*
2
,
(
view
)
=>
undefined
,
(
view
)
=>
Number
.
NaN
,
(
view
)
=>
Number
.
POSITIVE_INFINITY
,
(
view
)
=>
Number
.
NEGATIVE_INFINITY
,
(
view
)
=>
'
3.5
'
,
(
view
)
=>
3.5
,
(
view
)
=>
{
password
:
"
qumquat
"
},
(
view
)
=>
({
valueOf
:
()
=>
125
}),
(
view
)
=>
({
toString
:
()
=>
'
125
'
,
valueOf
:
false
})
// non-callable valueOf triggers invocation of toString
];
...
...
@@ -38,12 +33,21 @@ function testWithAtomicsOutOfBoundsIndices(f) {
* Calls the provided function for each good index that should not throw when
* passed to an Atomics method on a SAB-backed view.
*
* The view must have length greater than zero.
*
* @param f - the function to call for each good index.
*/
function
testWithAtomicsInBoundsIndices
(
f
)
{
// Most of these are eventually coerced to +0 by ToIndex.
var
good_indices
=
[
(
view
)
=>
0
/-
1
,
// -0
(
view
)
=>
0
/-
1
,
(
view
)
=>
'
-0
'
,
(
view
)
=>
undefined
,
(
view
)
=>
NaN
,
(
view
)
=>
0.5
,
(
view
)
=>
'
0.5
'
,
(
view
)
=>
-
0.9
,
(
view
)
=>
({
password
:
"
qumquat
"
}),
(
view
)
=>
view
.
length
-
1
,
(
view
)
=>
({
valueOf
:
()
=>
0
}),
(
view
)
=>
({
toString
:
()
=>
'
0
'
,
valueOf
:
false
})
// non-callable valueOf triggers invocation of toString
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment