@@ -180,6 +180,8 @@ public void AddDLLExtensionAppType(System.Type type)
180
180
/// </summary>
181
181
public bool IsParsingCodeBlockNode { get ; set ; }
182
182
183
+ internal bool IsParsingInTestMode { get ; set ; }
184
+
183
185
// This is the AST node list of default imported libraries needed for Graph Compiler
184
186
public CodeBlockNode ImportNodes { get ; set ; }
185
187
@@ -424,19 +426,54 @@ public void ResetForPrecompilation()
424
426
ForLoopBlockIndex = Constants . kInvalidIndex ;
425
427
}
426
428
427
- private void ResetAll ( Options options )
429
+ // The unique subscript for SSA temporaries
430
+ // TODO Jun: Organize these variables in core into proper enums/classes/struct
431
+ public int SSASubscript { get ; set ; }
432
+ public Guid SSASubscript_GUID { get ; set ; }
433
+ public int SSAExprUID { get ; set ; }
434
+ public int SSAExpressionUID { get ; set ; }
435
+
436
+ /// <summary>
437
+ /// ExpressionUID is used as the unique id to identify an expression
438
+ /// It is incremented by 1 after mapping its current value to an expression
439
+ /// </summary>
440
+ public int ExpressionUID { get ; set ; }
441
+
442
+ private int tempVarId = 0 ;
443
+ private int tempLanguageId = 0 ;
444
+
445
+
446
+ // TODO Jun: Cleansify me - i dont need to be here
447
+ public AssociativeNode AssocNode { get ; set ; }
448
+ public int watchStartPC { get ; set ; }
449
+
450
+
451
+ //
452
+ // TODO Jun: This is the expression interpreters executable.
453
+ // It must be moved to its own core, whre each core is an instance of a compiler+interpreter
454
+ //
455
+ public Executable ExprInterpreterExe { get ; set ; }
456
+ public int watchFunctionScope { get ; set ; }
457
+ public int watchBaseOffset { get ; set ; }
458
+ public List < SymbolNode > watchSymbolList { get ; set ; }
459
+
460
+ public CodeGen assocCodegen { get ; set ; }
461
+
462
+ public TextWriter ExecutionLog { get ; set ; }
463
+
464
+ public Core ( Options options )
428
465
{
429
466
Heap = new Heap ( ) ;
430
467
//Rmem = new RuntimeMemory(Heap);
431
468
Configurations = new Dictionary < string , object > ( ) ;
432
469
DllTypesToLoad = new List < System . Type > ( ) ;
433
470
434
471
Options = options ;
435
-
472
+
436
473
Compilers = new Dictionary < Language , Compiler > ( ) ;
437
474
ClassIndex = Constants . kInvalidIndex ;
438
475
439
- FunctionTable = new FunctionTable ( ) ;
476
+ FunctionTable = new FunctionTable ( ) ;
440
477
441
478
442
479
watchFunctionScope = Constants . kInvalidIndex ;
@@ -498,7 +535,7 @@ private void ResetAll(Options options)
498
535
499
536
500
537
ParsingMode = ParseMode . Normal ;
501
-
538
+
502
539
IsParsingPreloadedAssembly = false ;
503
540
IsParsingCodeBlockNode = false ;
504
541
ImportHandler = null ;
@@ -515,46 +552,6 @@ private void ResetAll(Options options)
515
552
newEntryPoint = Constants . kInvalidIndex ;
516
553
}
517
554
518
- // The unique subscript for SSA temporaries
519
- // TODO Jun: Organize these variables in core into proper enums/classes/struct
520
- public int SSASubscript { get ; set ; }
521
- public Guid SSASubscript_GUID { get ; set ; }
522
- public int SSAExprUID { get ; set ; }
523
- public int SSAExpressionUID { get ; set ; }
524
-
525
- /// <summary>
526
- /// ExpressionUID is used as the unique id to identify an expression
527
- /// It is incremented by 1 after mapping its current value to an expression
528
- /// </summary>
529
- public int ExpressionUID { get ; set ; }
530
-
531
- private int tempVarId = 0 ;
532
- private int tempLanguageId = 0 ;
533
-
534
-
535
- // TODO Jun: Cleansify me - i dont need to be here
536
- public AssociativeNode AssocNode { get ; set ; }
537
- public int watchStartPC { get ; set ; }
538
-
539
-
540
- //
541
- // TODO Jun: This is the expression interpreters executable.
542
- // It must be moved to its own core, whre each core is an instance of a compiler+interpreter
543
- //
544
- public Executable ExprInterpreterExe { get ; set ; }
545
- public int watchFunctionScope { get ; set ; }
546
- public int watchBaseOffset { get ; set ; }
547
- public List < SymbolNode > watchSymbolList { get ; set ; }
548
-
549
- public CodeGen assocCodegen { get ; set ; }
550
-
551
- public TextWriter ExecutionLog { get ; set ; }
552
-
553
- public Core ( Options options )
554
- {
555
- ResetAll ( options ) ;
556
- }
557
-
558
555
public SymbolNode GetFirstVisibleSymbol ( string name , int classscope , int function , CodeBlock codeblock )
559
556
{
560
557
Validity . Assert ( null != codeblock ) ;
0 commit comments