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

v8: fix RegExp nits in v8_prof_polyfill.js #13709

Closed
wants to merge 1 commit into from
Closed

v8: fix RegExp nits in v8_prof_polyfill.js #13709

wants to merge 1 commit into from

Conversation

vsemozhetbyt
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

v8

  • Do not repeat RegExp creation in a cycle.
  • Use sufficient string instead of RegExp in split().

I am not sure about the status of this lib file (it is excluded from linting and is not tested in common CI). I've stumbled upon these fragments in some recent overall RegExp checks. The fixes seem rather simple and safe, but please suggest the ways we should test them if needed.

* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().
@vsemozhetbyt vsemozhetbyt added the v8 engine Issues and PRs related to the V8 dependency. label Jun 15, 2017
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Jun 15, 2017
@vsemozhetbyt
Copy link
Contributor Author

cc @nodejs/v8, @nodejs/performance

Copy link
Member

@indutny indutny left a comment

Choose a reason for hiding this comment

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

LGTM

@vsemozhetbyt
Copy link
Contributor Author

Landed in 6b9500b

@vsemozhetbyt vsemozhetbyt deleted the v8_prof_polyfill.js-regexp branch June 18, 2017 23:22
vsemozhetbyt added a commit that referenced this pull request Jun 18, 2017
* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().

PR-URL: #13709
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax pushed a commit that referenced this pull request Jun 20, 2017
* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().

PR-URL: #13709
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@addaleax addaleax mentioned this pull request Jun 21, 2017
addaleax pushed a commit that referenced this pull request Jun 21, 2017
* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().

PR-URL: #13709
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@addaleax addaleax mentioned this pull request Jun 21, 2017
@MylesBorins
Copy link
Contributor

Should this be backported to v6.x?

@targos
Copy link
Member

targos commented Aug 3, 2017

It cherry-picks cleanly. I don't think it could cause any issue.

MylesBorins pushed a commit that referenced this pull request Aug 14, 2017
* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().

PR-URL: #13709
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

MylesBorins commented Aug 15, 2017

I landed this on v6.x-staging and it seems to have been responsible for some failures on AIX + certain flavors of windows. I've backed it out for now and doing testing to see if the suite passes with this temporarily removed

failure below

not ok 56 parallel/test-child-process-detached --- duration_ms: 0.820 severity: fail stack: |-
assert.js:81
  throw new assert.AssertionError({
  ^
AssertionError: Got unwanted exception..
    at _throws (assert.js:356:5)
    at Function.assert.doesNotThrow (assert.js:374:3)
    at process.<anonymous> (/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/test/parallel/test-child-process-detached.js:22:10)
    at emitOne (events.js:101:20)
    at process.emit (events.js:188:7)

...

edit: appears unrelated. going to bisect on machine and likely reland soon

edit 2: relanded

MylesBorins pushed a commit that referenced this pull request Aug 16, 2017
* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().

PR-URL: #13709
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Aug 16, 2017
MylesBorins pushed a commit that referenced this pull request Sep 5, 2017
* Do not repeat RegExp creation in cycle.
* Use sufficient string instead of RegExp in split().

PR-URL: #13709
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants