Commit Graph

7 Commits

Author SHA1 Message Date
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