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

REALMC-11689: add arrow functions, typed array fixes, more date-time formats, ... #47

Merged
merged 19 commits into from
Feb 4, 2022
Merged

REALMC-11689: add arrow functions, typed array fixes, more date-time formats, ... #47

merged 19 commits into from
Feb 4, 2022

Conversation

Gabri3l
Copy link

@Gabri3l Gabri3l commented Feb 4, 2022

dop251 and others added 19 commits February 4, 2022 11:57
fixes dop251#306

Signed-off-by: Gabri <[email protected]>
(cherry picked from commit b4db7b1)
…lution. Instead place a marker on stack and use it to count the number of args. Fixes dop251#311.

Signed-off-by: Gabri <[email protected]>
(cherry picked from commit c6e1779)
Signed-off-by: Gabri <[email protected]>
(cherry picked from commit f87bc71)
Signed-off-by: Gabri <[email protected]>
(cherry picked from commit 9cf7f40)
* Implemented arrow functions. See dop251#304.

* Define the name property for anonymous functions (including arrow functions)

* Treat "arguments" as a lexical binding to match the latest specification

Signed-off-by: Gabri <[email protected]>
(cherry picked from commit 9981850)
… support for additional datetime formats. Fixes dop251#281, fixes dop251#292.

Signed-off-by: Gabri <[email protected]>
(cherry picked from commit f605f7b)
Signed-off-by: Gabri <[email protected]>
(cherry picked from commit 797091d)
@@ -25,7 +25,7 @@ func (muc TestNativeMemUsageChecker) NativeMemUsage(value interface{}) (uint64,
func TestMemCheck(t *testing.T) {
// This is the sum of property names allocated at each new (empty) scope
var emptyFunctionScopeOverhead uint64 = 8
var functionStackOverhead uint64 = 30
var functionStackOverhead uint64 = 34
Copy link
Author

Choose a reason for hiding this comment

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

This is the only change I had to make

@Gabri3l Gabri3l changed the title REALMC-11689: add arrow functions, typed array fixes, moew date-time formats, ... REALMC-11689: add arrow functions, typed array fixes, more date-time formats, ... Feb 4, 2022
@Gabri3l Gabri3l requested review from tsedgwick and arahmanan and removed request for tsedgwick February 4, 2022 18:24
Copy link

@tsedgwick tsedgwick left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@arahmanan arahmanan left a comment

Choose a reason for hiding this comment

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

LGTM! Just a question, which could be part of a separate ticket/PR since I noticed that some other existing objects such as mapIterObject and setObject don't have a MemUsage function.

Comment on lines +18 to 35
type baseJsFuncObject struct {
baseFuncObject

stash *stash
prg *Program
src string
stash *stash
prg *Program
src string
strict bool
}

type funcObject struct {
baseJsFuncObject
}

type arrowFuncObject struct {
baseJsFuncObject
this Value
newTarget Value
}

Choose a reason for hiding this comment

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

[q] should we modify/add the MemUsage function for these objects?

Copy link
Author

Choose a reason for hiding this comment

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

Good call, let me take a look!

Copy link
Author

@Gabri3l Gabri3l Feb 4, 2022

Choose a reason for hiding this comment

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

Actually I will create a separate ticket so that I can first try to pull in the remaining changes from goja.

https://jira.mongodb.org/browse/REALMC-11692

@Gabri3l Gabri3l merged commit ecdfff3 into mongodb-forks:realm Feb 4, 2022
@Gabri3l Gabri3l deleted the update_goja_part_2 branch February 4, 2022 20:38
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.

5 participants