Gaming4JC
ab85510c20
1216630 - Rename preludeStart and postludeEnd to toStringStart and toStringEnd and misc fixes.
2019-07-22 19:51:41 +08:00
Gaming4JC
f79ee2fd83
1216630 - Print class source when calling toString on the constructor.
...
This is accomplished in the following ways.
LazyScripts and JSScripts now have 4 offsets:
- Source begin and end for the actual source. This is used for lazy parsing.
- toString begin and end for toString. Some kinds of functions, like async, only have a different begin offset. Class constructors have different offsets for both begin and end.
For syntactically present (i.e. non-default) constructors, the class source span is remembered directly on the LazyScript or JSScript. The toString implementation then splices out the substring directly. For default constructors, a new SRC_CLASS SrcNote type is added. It's binary and has as its arguments the begin and end offsets of the class expression or statement. MakeDefaultConstructor reads the note and overrides the cloned self-hosted function's source object. This is probably the least intrusive way to accomplish this.
2019-07-22 19:51:38 +08:00
Gaming4JC
006b0f5d17
104442 - Part 1: Report the position and the kind of previous declaration for redeclaration error.
2019-07-22 19:51:20 +08:00
Gaming4JC
9b7c6181e6
1339963 - Part 3: Check IdentifierName in ExportClause without from.
2019-07-22 19:51:15 +08:00
Gaming4JC
942760e3c4
1339963 - Part 1: Split Parser::exportDeclaration.
2019-07-22 19:51:08 +08:00
Gaming4JC
138d60c071
1336783 - followup: Fix rooting.
2019-07-22 19:50:53 +08:00
Gaming4JC
9be68cbc6e
1336783 - Part 2: Remove Parser::checkStrictBinding.
2019-07-22 19:50:47 +08:00
Gaming4JC
c1f6b0ff36
1336783 - Part 1: Rework on reserved word and remove TokenStream::KeywordIsName.
2019-07-22 19:50:44 +08:00
Gaming4JC
dc06903cd1
1283712 - Part 3: Add Parser::errorWithNotes and Parser::errorWithNotesAt.
2019-07-22 19:49:50 +08:00
Gaming4JC
ee1e2aba19
1317375 - Implement "Template Literals Revision / Lifting Template Literal Restriction" ECMAScript proposal
2019-07-22 19:47:00 +08:00
Gaming4JC
94c6eea52b
1325157 - Implement a ParserBase class that holds functionality that's identical between syntax parsing and full parsing.
2019-07-22 19:46:21 +08:00
Gaming4JC
7f7b0a029c
636635 - Do not create named lambda binding for a function created by Function constructor.
2019-07-22 19:46:11 +08:00
Gaming4JC
02761b7fc2
1317153 - Provide better error message when errornous syntax possibly match "await SOMETHING" outside async function.
2019-07-22 19:46:00 +08:00
wolfbeast
eea318fce4
Remove Parser::reportHelper since it's no longer used.
2019-04-13 07:02:00 +08:00
wolfbeast
ff81b6b3d8
Remove Parser::reportWithNode and its remaining callers.
...
All of the callsites have a full ParseNode* at hand, of which the offset
can be directly accessed.
2019-04-13 07:01:56 +08:00
wolfbeast
a389b4e151
Report errors for bad increment/decrement operands using
...
explicitly-specified offsets.
2019-04-13 07:01:54 +08:00
wolfbeast
33d09dce8b
Simplify checking of targets within destructuring patterns.
2019-04-13 07:01:52 +08:00
wolfbeast
fd2042225e
Simplify increment/decrement operand checking.
2019-04-13 07:01:51 +08:00
wolfbeast
598c71feb0
Inline Parser::checkAssignmentToCall into its sole caller.
2019-04-13 07:01:49 +08:00
wolfbeast
e9b63ee1fe
Simplify checking of the left-hand side of assignment and compound
...
assignment expressions.
2019-04-13 07:01:45 +08:00
wolfbeast
71dc0dd5c0
Report some errors about invalid left-hand-sides in for-in/of loop heads
...
using code with an explicitly computed offset.
2019-04-13 07:01:41 +08:00
wolfbeast
218c8ce05c
Introduce Parser::warningAt
...
This reduces reporting an warning at a particular offset to its bare
essentials, simplifying calls.
2019-04-13 07:01:36 +08:00
wolfbeast
f1f8d377a9
Remove Parser::reportBadReturn
...
Report simpler errors that don't use the offset of a node as location.
2019-04-13 07:01:31 +08:00
wolfbeast
07c1fa20ea
Introduce Parser::errorAt
...
This reduces reporting an error at a particular offset to its bare
essentials, simplifying calls.
2019-04-13 07:01:29 +08:00
wolfbeast
9191d0d06b
Inline Parser::checkFunctionDefinition into its sole caller.
2019-04-13 07:01:27 +08:00
wolfbeast
da1cb60dc3
Move the Parser::checkFunctionDefinition call into its callers.
2019-04-13 07:01:23 +08:00
wolfbeast
5cb16b488f
Move part of Parser::functionDefinition into callers.
2019-04-13 07:01:21 +08:00
wolfbeast
e92f878a93
Track strict mode errors in unary deletions correctly when
...
syntax-parsing.
2019-04-13 07:01:18 +08:00
wolfbeast
a652eb1916
Change report at current offset to warning(), extraWarning() and error()
2019-04-13 07:01:14 +08:00
wolfbeast
70fbb46d9e
Remove the |bool strict| argument from the report-at-current-offset
...
Parser function (zeport).
zeport => qeport
2019-04-13 07:01:12 +08:00
wolfbeast
e9ffb69b02
Split Parser::report into Parser::zeport (a temporary name) that uses
...
the current offset, and Parser::reportWithNode that derives it from a
Node.
2019-04-13 07:01:10 +08:00
wolfbeast
b68de773fd
Stage 1-1: Implement Function.prototype.toString revision proposal.
...
Tag #960
2019-04-13 07:00:18 +08:00
adeshkp
521c918660
Remove telemetry leftovers from JS engine.
2019-02-16 00:27:38 +08:00
janekptacijarabaci
0e7a16c088
Bug 755821: Function() should use the parser's argument parsing code
2019-02-15 23:38:10 +08:00
Roy Tam
dcd9973243
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
2018-01-19 03:59:58 +08:00