repl: fix generator function preprocessing #9852

Merged
merged 1 commit into from Dec 2, 2016

Projects

None yet

5 participants

@not-an-aardvark
Member
Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

repl

Description of change

Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.

Fixes: #9850

@targos
targos approved these changes Nov 30, 2016 View changes
@not-an-aardvark
Member

@princejwesley I noticed #9752 hasn't landed yet. I was planning to land this later tonight, but would you rather I wait until #9752 lands? (Personally I think it would be fine to land this PR and then rebase #9752 afterwards.)

@princejwesley
Contributor

@not-an-aardwark no problem 😄

@not-an-aardvark not-an-aardvark repl: fix generator function preprocessing
Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.

PR-URL: nodejs#9852
Fixes: nodejs#9850
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
24a98dd
@not-an-aardvark not-an-aardvark merged commit 24a98dd into nodejs:master Dec 2, 2016
@not-an-aardvark
Member

Landed in 24a98dd

@addaleax addaleax added a commit that referenced this pull request Dec 5, 2016
@not-an-aardvark @addaleax not-an-aardvark + addaleax repl: fix generator function preprocessing
Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.

PR-URL: #9852
Fixes: #9850
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
9099664
@Fishrock123 Fishrock123 referenced this pull request Dec 5, 2016
Merged

v7.2.1 proposal #10127

2 of 2 tasks complete
@Fishrock123 Fishrock123 added a commit that referenced this pull request Dec 6, 2016
@Fishrock123 Fishrock123 2016-12-06, Version 7.2.1 (Current)
Notable changes:

* buffer:
  - Reverted the runtime deprecation of calling `Buffer()` without
`new`. (Anna Henningsen) #9529
  - Fixed `buffer.transcode()` for single-byte character
encodings to `UCS2`. (Anna Henningsen)
#9838
* promise: `--trace-warnings` now produces useful stacktraces for
Promise warnings. (Anna Henningsen)
#9525
* repl: Fixed a bug preventing correct parsing of generator functions.
(Teddy Katz) #9852
* V8: Fixed a significant `instanceof` performance regression.
(Franziska Hinkelmann) #9730

PR-URL: #10127
8ab8363
@imyller imyller added a commit to imyller/meta-nodejs that referenced this pull request Dec 7, 2016
@imyller imyller 2016-12-06, Version 7.2.1 (Current)
    Notable changes:

    * buffer:
      - Reverted the runtime deprecation of calling `Buffer()` without
    `new`. (Anna Henningsen) nodejs/node#9529
      - Fixed `buffer.transcode()` for single-byte character
    encodings to `UCS2`. (Anna Henningsen)
    nodejs/node#9838
    * promise: `--trace-warnings` now produces useful stacktraces for
    Promise warnings. (Anna Henningsen)
    nodejs/node#9525
    * repl: Fixed a bug preventing correct parsing of generator functions.
    (Teddy Katz) nodejs/node#9852
    * V8: Fixed a significant `instanceof` performance regression.
    (Franziska Hinkelmann) nodejs/node#9730

Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
cc842d4
@jmdarling jmdarling added a commit to jmdarling/node that referenced this pull request Dec 8, 2016
@not-an-aardvark @jmdarling not-an-aardvark + jmdarling repl: fix generator function preprocessing
Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.

PR-URL: nodejs#9852
Fixes: nodejs#9850
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
8a7a0ef
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 20, 2016
@not-an-aardvark @MylesBorins not-an-aardvark + MylesBorins repl: fix generator function preprocessing
Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.

PR-URL: #9852
Fixes: #9850
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
eba4f9a
@MylesBorins MylesBorins added a commit that referenced this pull request Dec 21, 2016
@not-an-aardvark @MylesBorins not-an-aardvark + MylesBorins repl: fix generator function preprocessing
Function declarations in the REPL are preprocessed into variable
declarations before being evaluated. However, the preprocessing logic
did not account for the star in a generator function declaration, which
caused the preprocessor to output invalid syntax in some circumstances.

PR-URL: #9852
Fixes: #9850
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
bfc9454
@MylesBorins MylesBorins referenced this pull request Dec 21, 2016
Merged

V6.9.3 proposal #10394

@MylesBorins MylesBorins added a commit to MylesBorins/node that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2016-01-03, Version 6.9.3 'Boron' (LTS) Release
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) nodejs#9675
* deps:
    - *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
             nodejs#9847
    - *V8*: Destructuring of arrow function arguments via computed
            property no longer throws (Michaël Zasso)
            nodejs#10386)
* inspector:
  - /json/version returns object, not an object wrapped in an array
    (Ben Noordhuis) nodejs#9762
* module:
  - using --debug-brk and --eval together now works as expected
    (Kelvin Jin) nodejs#8876
* process:
  - improve performance of nextTick up to 20% (Evan Lucas)
    nodejs#8932
* repl:
    - the division operator will no longer be accidentally parsed as
      regex (Teddy Katz) nodejs#10103
    - improved support for generator functions (Teddy Katz)
      nodejs#9852
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) nodejs#9685

PR-URL: nodejs#10394
93a9109
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2017-01-03, Version 6.9.3 'Boron' (LTS) Release
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) #9675
* deps:
    - *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
             #9847
    - *V8*: Destructuring of arrow function arguments via computed
            property no longer throws (Michaël Zasso)
            #10386)
* inspector:
  - /json/version returns object, not an object wrapped in an array
    (Ben Noordhuis) #9762
* module:
  - using --debug-brk and --eval together now works as expected
    (Kelvin Jin) #8876
* process:
  - improve performance of nextTick up to 20% (Evan Lucas)
    #8932
* repl:
    - the division operator will no longer be accidentally parsed as
      regex (Teddy Katz) #10103
    - improved support for generator functions (Teddy Katz)
      #9852
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) #9685

PR-URL: #10394
42149d7
@MylesBorins MylesBorins added a commit that referenced this pull request Jan 3, 2017
@MylesBorins MylesBorins 2017-01-03, Version 6.9.3 'Boron' (LTS) Release
This LTS release comes with 312 commits. This includes 229 that are
test related, 62 that are docs related, 17 which are build / tools
related, and 4 commits which are updates to dependencies.

Notable Changes:

* build:
  - shared library support is now working for AIX builds
    (Stewart Addison) #9675
* deps:
    - *npm*: upgrade npm to 3.10.10 (Rebecca Turner)
             #9847
    - *V8*: Destructuring of arrow function arguments via computed
            property no longer throws (Michaël Zasso)
            #10386)
* inspector:
  - /json/version returns object, not an object wrapped in an array
    (Ben Noordhuis) #9762
* module:
  - using --debug-brk and --eval together now works as expected
    (Kelvin Jin) #8876
* process:
  - improve performance of nextTick up to 20% (Evan Lucas)
    #8932
* repl:
    - the division operator will no longer be accidentally parsed as
      regex (Teddy Katz) #10103
    - improved support for generator functions (Teddy Katz)
      #9852
* timers:
  - Re canceling a cancelled timers will no longer throw
    (Jeremiah Senkpiel) #9685

PR-URL: #10394
2bf1c24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment