Repository navigation
Hard fork latest Goja with PCRE2 and integrated NodeJS - #1
Merged
Merged
Conversation
git-subtree-dir: nodejs git-subtree-split: 1f56ff5bcf1444844c756986ed5fc03069aec1ff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
8f1c0696a37b221d3b14dc4c2e826cc22a6b723d1f56ff5bcf1444844c756986ed5fc03069aec1ffundernodejs/github.com/yaklang/goja, targeting Go 1.22.12github.com/dlclark/regexp2from source and the production module graphgo-pcre2-lite v0.1.6/ embedded PCRE2 10.47 as the only backtracking backend(pattern, flags)while keeping each RegExp object's mutable state independentDependency proof
go.modand onego.sumin Gojago list -m allcontainsgithub.com/VillanCh/go-pcre2-lite v0.1.6and nogithub.com/dlclark/regexp2github.com/dlclark/regexp2reference exists in Go source,go.mod, orgo.sumdlclark/regexp2development or production dependency; its complete module graph contains only itselfValidation
go test -count=1 ./...go test -race -count=1 ./...go test -count=1 -run '^TestTC39$' .CGO_ENABLED=0 go test -run '^$' ./...go vet ./...go mod verifynpm test --workspaces --if-presentinnodejs/Performance snapshot
Apple M1 Max, darwin/arm64, Go 1.22.12, cgo enabled, three iterations:
The measured workload scales approximately linearly with source size. The real 28.09 MiB Yakit bundle compiled in 1.752 s at 16.81 MB/s. See
BENCHMARK.mdfor commands and allocation data.Compatibility note
Go 1.22 lacks
weak.Pointerandruntime.AddCleanup. The compatibility layer stores WeakMap/WeakSet entries on key objects. Observable JS behavior is preserved, but values may remain reachable while their keys remain reachable after the collection is collected. This is documented inFORK.mdand should be revisited when Yaklang moves to Go 1.25.