()
| 745 | |
| 746 | export class ParseProcessor extends LogReader { |
| 747 | constructor() { |
| 748 | super(); |
| 749 | this.setDispatchTable({ |
| 750 | // Avoid accidental leaking of __proto__ properties and force this object |
| 751 | // to be in dictionary-mode. |
| 752 | __proto__: null, |
| 753 | // "function",{event type}, |
| 754 | // {script id},{start position},{end position},{time},{timestamp}, |
| 755 | // {function name} |
| 756 | 'function': { |
| 757 | parsers: [ |
| 758 | parseString, parseInt, parseInt, parseInt, parseFloat, parseInt, |
| 759 | parseString |
| 760 | ], |
| 761 | processor: this.processFunctionEvent |
| 762 | }, |
| 763 | // "compilation-cache","hit"|"put",{type},{scriptid},{start position}, |
| 764 | // {end position},{timestamp} |
| 765 | 'compilation-cache': { |
| 766 | parsers: |
| 767 | [parseString, parseString, parseInt, parseInt, parseInt, parseInt], |
| 768 | processor: this.processCompilationCacheEvent |
| 769 | }, |
| 770 | 'script': { |
| 771 | parsers: [parseString, parseInt, parseInt], |
| 772 | processor: this.processScriptEvent |
| 773 | }, |
| 774 | // "script-details", {script_id}, {file}, {line}, {column}, {size} |
| 775 | 'script-details': { |
| 776 | parsers: [parseInt, parseString, parseInt, parseInt, parseInt], |
| 777 | processor: this.processScriptDetails |
| 778 | }, |
| 779 | 'script-source': { |
| 780 | parsers: [parseInt, parseString, parseString], |
| 781 | processor: this.processScriptSource |
| 782 | }, |
| 783 | }); |
| 784 | this.functionEventDispatchTable_ = { |
| 785 | // Avoid accidental leaking of __proto__ properties and force this object |
| 786 | // to be in dictionary-mode. |
| 787 | __proto__: null, |
| 788 | 'full-parse': this.processFull.bind(this), |
| 789 | 'parse-function': this.processParseFunction.bind(this), |
| 790 | // TODO(cbruni): make sure arrow functions emit a normal parse-function |
| 791 | // event. |
| 792 | 'parse': this.processParseFunction.bind(this), |
| 793 | 'parse-script': this.processParseScript.bind(this), |
| 794 | 'parse-eval': this.processParseEval.bind(this), |
| 795 | 'preparse-no-resolution': this.processPreparseNoResolution.bind(this), |
| 796 | 'preparse-resolution': this.processPreparseResolution.bind(this), |
| 797 | 'first-execution': this.processFirstExecution.bind(this), |
| 798 | 'interpreter-lazy': this.processCompileLazy.bind(this), |
| 799 | 'interpreter': this.processCompile.bind(this), |
| 800 | 'interpreter-eval': this.processCompileEval.bind(this), |
| 801 | 'baseline': this.processBaselineLazy.bind(this), |
| 802 | 'baseline-lazy': this.processBaselineLazy.bind(this), |
| 803 | 'optimize-lazy': this.processOptimizeLazy.bind(this), |
| 804 | 'deserialize': this.processDeserialize.bind(this), |
nothing calls this directly
no test coverage detected