Commit Graph

18 Commits

Author SHA1 Message Date
Moonchild 2e4620b5af Issue #2692 - Part 6: Don't #include js/SourceBufferHolder.h in jsapi.h.
Instead, require users to do so. This is a minor translation-unit size
improvement for anyone who never has to use SourceBufferHolder other than
by reference.
2025-03-13 23:01:46 +08:00
Brian Smith 1c70f64e7c Issue #2236 - Fix import.meta module error in lambdas by moving parseGoal() into SharedContext. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1604792 Also remove ParseGoal being passed through Parser introduced in #1691 Part 2. 2023-05-10 11:55:55 +08:00
Martok 235ca77949 Issue #2142 - Handle fields in derived classes
* Don't name field initializer lambdas

Based-on: m-c 1534721, 1551454, 1542448
2023-05-01 13:27:01 +08:00
Brian Smith 993476283d Issue #1691 - Part 7e: Dependencies for required to finish part 7d. https://bugzilla.mozilla.org/show_bug.cgi?id=1331662 Reimplement EvaluateString using the ExecutionContext class. https://bugzilla.mozilla.org/show_bug.cgi?id=1316078 Extract redudant code into StartOffThreadParseTask. Use an ExclusiveContext instead of a JSContext in XDR functions. Add a script decoder as a valid off-main-thread parse-task. https://bugzilla.mozilla.org/show_bug.cgi?id=900784 Add nsJSUtils functions for encoding and decoding the bytecode. https://bugzilla.mozilla.org/show_bug.cgi?id=1316081 Add XDRIncrementalEncoder to replace delazified LazyScript in the encoded XDR buffer. Add an XDRIncrementalEncoder instance on the ScriptSource. Expose a new JSAPI to incrementally encode bytecode when it is generated. https://bugzilla.mozilla.org/show_bug.cgi?id=1334091 XDR function use the sourceObject instead of the enclosingScript as argument.
(cherry picked from commit d6de9a669f4b2f5115670bd771cd53d7cfb3956a)
2023-04-30 21:20:33 +08:00
Brian Smith a8ab41b4c6 Issue #1691 - Part 2: Implement call import and import meta in the parser. https://bugzilla.mozilla.org/show_bug.cgi?id=1427610 https://bugzilla.mozilla.org/show_bug.cgi?id=1484948
(cherry picked from commit 6be083187f49e444de1bb116bb5930b20125190b)
2023-04-30 21:16:43 +08:00
Martok 0dac791851 Issue #2173 - Separate CodeNode into FunctionNode and ModuleNode
ModuleNode only has a body and FunctionNode has many more attributes,
and will get more in the following commit.

Based-on: 1518391/2
2023-04-05 07:18:42 +08:00
Martok ba730c488f Issue #2173 - Add accessors to NameNode, CodeNode, RegExpLiteral, and add NumericLiteral
Based-on: m-c 1479659/{5,9,10}, m-c 1491147
2023-04-05 07:16:27 +08:00
Moonchild dabd32f955 Issue #1656 - Part 7: Nuke vim config lines in JS 2020-09-25 22:04:24 +08:00
Moonchild 9201808e0a Issue #618 - Report source position information (line/column)
Report source position information for module export resolution failures.

Ref: BZ 1362098
2020-07-10 22:18:10 +08:00
Gaming4JC 10b93afff4 Bug 1331092 - Part 2: Implement Async Generator except yield*.
Tag #1287
2019-12-18 09:16:52 +08:00
Gaming4JC 45337018ef Bug 1343481 - Part 2: Stop using StarGegerator for async function.
Tag #1287
2019-12-18 09:15:52 +08:00
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 07cd213071 1320408 - Part 2: Change JSFunction::getOrCreateScript to static method. 2019-07-22 19:47:27 +08:00
wolfbeast b68de773fd Stage 1-1: Implement Function.prototype.toString revision proposal.
Tag #960
2019-04-13 07:00:18 +08:00
janekptacijarabaci 34fe54e4e8 Part 2: Call NameFunctions after emitting
Issue #78
2019-02-15 23:38:45 +08:00
janekptacijarabaci 0e7a16c088 Bug 755821: Function() should use the parser's argument parsing code 2019-02-15 23:38:10 +08:00
roytam1 dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00