Skip to content
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

Enable es6toprimitive under experimental #1319

Merged
merged 1 commit into from
Jul 26, 2016

Conversation

suwc
Copy link

@suwc suwc commented Jul 22, 2016

Enable es6toprimitive under experimental flag.
Update following areas to be spec-compliant:

ToPrimitive (abstract operation)
Date.prototype@@toprimitive
Symbol.prototype@@toprimitive

Update unit tests with coverage on:

ToNumber (abstract operation)
ToString (abstract operation)
ToPropertyKey (abstract operation)
Abstract rational comparison (abstract operation)
Abstract equality comparison (abstract operation)
"+" operator
Date() constructor
Date.prototype.toJSON()

@suwc
Copy link
Author

suwc commented Jul 22, 2016

@Microsoft/chakra-es could you take look pls?

@akroshg
Copy link
Contributor

akroshg commented Jul 22, 2016

        Assert(!CrossSite::NeedMarshalVar(result, requestContext));

nit: (not related to your change) this assert should be moved below if check and its body. If this result is nullptr then this assert will throw, isn't it? #Closed


Refers to: lib/Runtime/Language/JavascriptConversion.cpp:528 in bf450f4. [](commit_id = bf450f4, deletion_comment = False)

assert.areEqual(Symbol.toStringTag, Symbol.toStringTag[Symbol.toPrimitive](), "Symbol.toStringTag");
assert.areEqual(Symbol.unscopables, Symbol.unscopables[Symbol.toPrimitive](), "Symbol.unscopables");

assert.throws(()=>Symbol.prototype[Symbol.toPrimitive].call(undefined), TypeError, "undefined", "Symbol[Symbol.toPrimitive]: 'this' is not a Symbol object");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are duplicated? same tests are there in the es6symbol.js, aren't they?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True - removed in latest rev.


In reply to: 71949683 [](ancestors = 71949683)

Enable es6toprimitive under experimental flag.
Update following areas to be spec-compliant:

ToPrimitive (abstract operation)
Date.prototype[@@toprimitive]()
Symbol.prototype[@@toprimitive]()

Update unit tests with coverage on:

ToNumber (abstract operation)
ToString (abstract operation)
ToPropertyKey (abstract operation)
Abstract rational comparison (abstract operation)
Abstract equality comparison (abstract operation)
+ operator
Date() constructor
Date.prototype.toJSON()
@suwc
Copy link
Author

suwc commented Jul 25, 2016

        Assert(!CrossSite::NeedMarshalVar(result, requestContext));

Make sense. Moved to latest rev.


In reply to: 234661240 [](ancestors = 234661240)


Refers to: lib/Runtime/Language/JavascriptConversion.cpp:528 in bf80652. [](commit_id = bf80652, deletion_comment = False)

@suwc suwc self-assigned this Jul 25, 2016
@akroshg
Copy link
Contributor

akroshg commented Jul 26, 2016

:shipit:

@chakrabot chakrabot merged commit bf450f4 into chakra-core:master Jul 26, 2016
chakrabot pushed a commit that referenced this pull request Jul 26, 2016
Merge pull request #1319 from suwc:build/suwc/buddy

Enable es6toprimitive under experimental flag.
Update following areas to be spec-compliant:

ToPrimitive (abstract operation)
Date.prototype[@@toprimitive]()
Symbol.prototype[@@toprimitive]()

Update unit tests with coverage on:

ToNumber (abstract operation)
ToString (abstract operation)
ToPropertyKey (abstract operation)
Abstract rational comparison (abstract operation)
Abstract equality comparison (abstract operation)
"+" operator
Date() constructor
Date.prototype.toJSON()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants