@@ -272,19 +272,19 @@ class Parser
272
272
ParseNodePid * CreateNameNode (IdentPtr pid);
273
273
ParseNodePid * CreateNameNode (IdentPtr pid, PidRefStack * ref, charcount_t ichMin, charcount_t ichLim);
274
274
ParseNodeSpecialName * CreateSpecialNameNode (IdentPtr pid, PidRefStack * ref, charcount_t ichMin, charcount_t ichLim);
275
- ParseNodeSuperReference * CreateSuperReferenceNode (OpCode nop, ParseNodePtr pnode1, ParseNodePtr pnode2);
276
- ParseNodeProg * CreateProgNode (bool isModuleSource);
275
+ ParseNodeSuperReference * CreateSuperReferenceNode (OpCode nop, ParseNodeSpecialName * pnode1, ParseNodePtr pnode2);
276
+ ParseNodeProg * CreateProgNode (bool isModuleSource, ULONG lineNumber );
277
277
278
278
ParseNodeCall * CreateCallNode (OpCode nop, ParseNodePtr pnode1, ParseNodePtr pnode2);
279
279
ParseNodeCall * CreateCallNode (OpCode nop, ParseNodePtr pnode1, ParseNodePtr pnode2, charcount_t ichMin, charcount_t ichLim);
280
- ParseNodeSuperCall * CreateSuperCallNode (ParseNodePtr pnode1, ParseNodePtr pnode2);
280
+ ParseNodeSuperCall * CreateSuperCallNode (ParseNodeSpecialName * pnode1, ParseNodePtr pnode2);
281
281
282
282
ParseNodeFnc * CreateDummyFuncNode (bool fDeclaration );
283
283
284
284
ParseNodeParamPattern * CreateParamPatternNode (ParseNodePtr pnode1);
285
285
ParseNodeParamPattern * CreateDummyParamPatternNode (charcount_t ichMin);
286
286
287
- Symbol* AddDeclForPid (ParseNodePtr pnode, IdentPtr pid, SymbolType symbolType, bool errorOnRedecl);
287
+ Symbol* AddDeclForPid (ParseNodeVar * pnode, IdentPtr pid, SymbolType symbolType, bool errorOnRedecl);
288
288
void CheckRedeclarationErrorForBlockId (IdentPtr pid, int blockId);
289
289
290
290
public:
@@ -431,12 +431,12 @@ class Parser
431
431
bool NextTokenIsPropertyNameStart () const { return m_token.tk == tkID || m_token.tk == tkStrCon || m_token.tk == tkIntCon || m_token.tk == tkFltCon || m_token.tk == tkLBrack || m_token.IsReservedWord (); }
432
432
433
433
template <bool buildAST>
434
- void PushStmt (StmtNest *pStmt, ParseNodePtr pnode, OpCode op, LabelId* pLabelIdList)
434
+ void PushStmt (StmtNest *pStmt, ParseNodeStmt * pnode, OpCode op, LabelId* pLabelIdList)
435
435
{
436
436
if (buildAST)
437
437
{
438
- pnode->AsParseNodeStmt ()-> grfnop = 0 ;
439
- pnode->AsParseNodeStmt ()-> pnodeOuter = (NULL == m_pstmtCur) ? NULL : m_pstmtCur->pnodeStmt ;
438
+ pnode->grfnop = 0 ;
439
+ pnode->pnodeOuter = (NULL == m_pstmtCur) ? NULL : m_pstmtCur->pnodeStmt ;
440
440
441
441
pStmt->pnodeStmt = pnode;
442
442
}
@@ -662,7 +662,9 @@ class Parser
662
662
StrictModeEnvironment smEnvironment = SM_NotUsed,
663
663
const bool isSourceElementList = false ,
664
664
bool * strictModeOn = NULL );
665
+ #if ENABLE_BACKGROUND_PARSING
665
666
bool FastScanFormalsAndBody ();
667
+ #endif
666
668
bool ScanAheadToFunctionEnd (uint count);
667
669
668
670
bool DoParallelParse (ParseNodeFnc * pnodeFnc) const ;
@@ -730,10 +732,10 @@ class Parser
730
732
void ParseTopLevelDeferredFunc (ParseNodeFnc * pnodeFnc, ParseNodeFnc * pnodeFncParent, LPCOLESTR pNameHint, bool fLambda , bool *pNeedScanRCurly = nullptr );
731
733
void ParseNestedDeferredFunc (ParseNodeFnc * pnodeFnc, bool fLambda , bool *pNeedScanRCurly, bool *pStrictModeTurnedOn);
732
734
void CheckStrictFormalParameters ();
733
- ParseNodePtr AddArgumentsNodeToVars (ParseNodeFnc * pnodeFnc);
735
+ ParseNodeVar * AddArgumentsNodeToVars (ParseNodeFnc * pnodeFnc);
734
736
ParseNodeVar * InsertVarAtBeginning (ParseNodeFnc * pnodeFnc, IdentPtr pid);
735
737
ParseNodeVar * CreateSpecialVarDeclNode (ParseNodeFnc * pnodeFnc, IdentPtr pid);
736
- void UpdateArgumentsNode (ParseNodeFnc * pnodeFnc, ParseNodePtr argNode);
738
+ void UpdateArgumentsNode (ParseNodeFnc * pnodeFnc, ParseNodeVar * argNode);
737
739
void UpdateOrCheckForDuplicateInFormals (IdentPtr pid, SList<IdentPtr> *formals);
738
740
739
741
LPCOLESTR GetFunctionName (ParseNodeFnc * pnodeFnc, LPCOLESTR pNameHint);
@@ -753,7 +755,7 @@ class Parser
753
755
754
756
// Construct the name from the parse node.
755
757
LPCOLESTR FormatPropertyString (LPCOLESTR propertyString, ParseNodePtr pNode, uint32 *fullNameHintLength, uint32 *pShortNameOffset);
756
- LPCOLESTR ConstructNameHint (ParseNodePtr pNode, uint32* fullNameHintLength, uint32 *pShortNameOffset);
758
+ LPCOLESTR ConstructNameHint (ParseNodeBin * pNode, uint32* fullNameHintLength, uint32 *pShortNameOffset);
757
759
LPCOLESTR AppendNameHints (IdentPtr left, IdentPtr right, uint32 *pNameLength, uint32 *pShortNameOffset, bool ignoreAddDotWithSpace = false , bool wrapInBrackets = false );
758
760
LPCOLESTR AppendNameHints (IdentPtr left, LPCOLESTR right, uint32 *pNameLength, uint32 *pShortNameOffset, bool ignoreAddDotWithSpace = false , bool wrapInBrackets = false );
759
761
LPCOLESTR AppendNameHints (LPCOLESTR left, IdentPtr right, uint32 *pNameLength, uint32 *pShortNameOffset, bool ignoreAddDotWithSpace = false , bool wrapInBrackets = false );
@@ -966,7 +968,7 @@ class Parser
966
968
967
969
template <class Fn >
968
970
void FinishFunctionsInScope (ParseNodePtr pnodeScopeList, Fn fn);
969
- void FinishDeferredFunction (ParseNodePtr pnodeScopeList);
971
+ void FinishDeferredFunction (ParseNodeBlock * pnodeScopeList);
970
972
971
973
/* **********************************************************************
972
974
Misc
0 commit comments