Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
The parser is failing to record the token location of new in new.target.
https://bugs.webkit.org/show_bug.cgi?id=195127 <rdar://problem/39645578> Reviewed by Yusuke Suzuki. JSTests: * stress/parser-should-record-token-location-of-new-dot-target.js: Added. Source/JavaScriptCore: Also adjust the token location for the following to be as shown: new.target ^ super ^ import.meta ^ * parser/Parser.cpp: (JSC::Parser<LexerType>::parseMemberExpression): Canonical link: https://commits.webkit.org/209486@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Mark Lam
committed
Feb 28, 2019
1 parent
d57274b
commit 940721c
Showing
4 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
8 changes: 8 additions & 0 deletions
8
JSTests/stress/parser-should-record-token-location-of-new-dot-target.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@ runDefault("--forceDebuggerBytecodeGeneration=true") | ||
|
||
// This test should not crash. | ||
|
||
function foo() { | ||
if (new.target) {} | ||
} | ||
+foo(); |
This file contains 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
This file contains 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