@@ -536,7 +536,7 @@ namespace ts {
536536 var r = ""
537537 for ( var i = 0 ; i < str . length ; i += 2 )
538538 r = str [ i ] + str [ i + 1 ] + r
539- ts . Debug . assert ( i == str . length )
539+ Debug . assert ( i == str . length )
540540 return r
541541 }
542542
@@ -552,7 +552,7 @@ namespace ts {
552552 if ( m )
553553 return [ parseInt ( m [ 1 ] , 16 ) ] . concat ( parseHexBytes ( bytes . slice ( 2 ) ) )
554554 else
555- ts . Debug . fail ( "bad bytes " + bytes )
555+ Debug . fail ( "bad bytes " + bytes )
556556 }
557557
558558 var currentSetup : string = null ;
@@ -588,7 +588,7 @@ namespace ts {
588588 bytes . push ( 0x00 )
589589 hex [ lastIdx ] = hexBytes ( bytes )
590590 }
591- ts . Debug . assert ( ( bytes [ 2 ] & 0xf ) == 0 )
591+ Debug . assert ( ( bytes [ 2 ] & 0xf ) == 0 )
592592
593593 bytecodeStartAddr = lastAddr + 16
594594 bytecodeStartIdx = lastIdx + 1
@@ -604,7 +604,7 @@ namespace ts {
604604 }
605605
606606 if ( ! jmpStartAddr )
607- ts . Debug . fail ( "No hex start" )
607+ Debug . fail ( "No hex start" )
608608
609609 funcInfo = { } ;
610610 var funs : FuncInfo [ ] = jsinf . functions . concat ( extInfo . functions ) ;
@@ -633,12 +633,12 @@ namespace ts {
633633 if ( ! inf ) return ;
634634 funcInfo [ inf . name ] = inf ;
635635 inf . value = parseInt ( swapBytes ( s . slice ( 0 , 8 ) ) , 16 ) & 0xfffffffe
636- ts . Debug . assert ( ! ! inf . value )
636+ Debug . assert ( ! ! inf . value )
637637 s = s . slice ( 8 )
638638 }
639639 }
640640
641- ts . Debug . fail ( ) ;
641+ Debug . fail ( ) ;
642642 }
643643
644644 export function lookupFunc ( name : string ) {
@@ -654,7 +654,7 @@ namespace ts {
654654 return null
655655 }
656656
657- function isRefDecl ( def : ts . Declaration ) {
657+ function isRefDecl ( def : Declaration ) {
658658 let tp = checker . getDeclaredTypeOfSymbol ( def . symbol )
659659 return isRefType ( tp )
660660 }
@@ -663,7 +663,7 @@ namespace ts {
663663 export class Location {
664664 isarg = false ;
665665
666- constructor ( public index : number , public def : ts . DeclarationStatement = null ) {
666+ constructor ( public index : number , public def : DeclarationStatement = null ) {
667667 }
668668
669669 toString ( ) {
@@ -695,7 +695,7 @@ namespace ts {
695695 }
696696
697697 emitStoreByRef ( proc : Procedure ) {
698- //ts. Debug.assert(this.def instanceof LocalDef) TODO
698+ //Debug.assert(this.def instanceof LocalDef) TODO
699699
700700 if ( this . isByRefLocal ( ) ) {
701701 this . emitLoadLocal ( proc ) ;
@@ -722,13 +722,13 @@ namespace ts {
722722
723723 emitStore ( proc : Procedure ) {
724724 if ( this . isarg )
725- ts . Debug . fail ( "store for arg" )
725+ Debug . fail ( "store for arg" )
726726
727727 if ( this . isGlobal ( ) ) {
728728 proc . emitInt ( this . index )
729729 proc . emitCall ( "bitvm::stglb" + this . refSuff ( ) , 0 ) ; // unref internal
730730 } else {
731- ts . Debug . assert ( ! this . isByRefLocal ( ) )
731+ Debug . assert ( ! this . isByRefLocal ( ) )
732732 if ( this . isRef ( ) ) {
733733 this . emitLoadCore ( proc ) ;
734734 proc . emitCallRaw ( "bitvm::decr" ) ;
@@ -752,7 +752,7 @@ namespace ts {
752752
753753 emitLoadLocal ( proc : Procedure ) {
754754 if ( this . isarg && proc . argsInR5 ) {
755- ts . Debug . assert ( 0 <= this . index && this . index < 32 )
755+ Debug . assert ( 0 <= this . index && this . index < 32 )
756756 proc . emit ( "ldr r0, [r5, #4*" + this . index + "]" )
757757 } else {
758758 this . emitLoadCore ( proc )
@@ -764,7 +764,7 @@ namespace ts {
764764 proc . emitInt ( this . index )
765765 proc . emitCall ( "bitvm::ldglb" + this . refSuff ( ) , 0 ) ; // unref internal
766766 } else {
767- ts . Debug . assert ( direct || ! this . isByRefLocal ( ) )
767+ Debug . assert ( direct || ! this . isByRefLocal ( ) )
768768 this . emitLoadLocal ( proc ) ;
769769 proc . emit ( "push {r0}" ) ;
770770 if ( this . isRef ( ) || this . isByRefLocal ( ) ) {
@@ -774,8 +774,8 @@ namespace ts {
774774 }
775775
776776 emitClrIfRef ( proc : Procedure ) {
777- // ts. Debug.assert(!this.isarg)
778- ts . Debug . assert ( ! this . isGlobal ( ) )
777+ // Debug.assert(!this.isarg)
778+ Debug . assert ( ! this . isGlobal ( ) )
779779 if ( this . isRef ( ) || this . isByRefLocal ( ) ) {
780780 this . emitLoadCore ( proc ) ;
781781 proc . emitCallRaw ( "bitvm::decr" ) ;
@@ -786,7 +786,7 @@ namespace ts {
786786 export class Procedure {
787787 numArgs = 0 ;
788788 hasReturn = false ;
789- action : ts . FunctionLikeDeclaration ;
789+ action : FunctionLikeDeclaration ;
790790 argsInR5 = false ;
791791 seqNo : number ;
792792 lblNo = 0 ;
@@ -802,18 +802,18 @@ namespace ts {
802802 }
803803
804804 getName ( ) {
805- let text = this . action ? ( < ts . Identifier > this . action . name ) . text : null
805+ let text = this . action ? ( < Identifier > this . action . name ) . text : null
806806 return text || "inline"
807807 }
808808
809- mkLocal ( def : ts . DeclarationStatement = null ) {
809+ mkLocal ( def : DeclarationStatement = null ) {
810810 var l = new Location ( this . locals . length , def )
811811 //if (def) console.log("LOCAL: " + def.getName() + ": ref=" + def.isByRef() + " cap=" + def._isCaptured + " mut=" + def._isMutable)
812812 this . locals . push ( l )
813813 return l
814814 }
815815
816- emitClrs ( omit : ts . Declaration , inclArgs = false ) {
816+ emitClrs ( omit : Declaration , inclArgs = false ) {
817817 var lst = this . locals
818818 if ( inclArgs )
819819 lst = lst . concat ( this . args )
@@ -829,9 +829,9 @@ namespace ts {
829829
830830 emitCall ( name : string , mask : number ) {
831831 var inf = lookupFunc ( name )
832- ts . Debug . assert ( ! ! inf , "unimplemented function: " + name )
832+ Debug . assert ( ! ! inf , "unimplemented function: " + name )
833833
834- ts . Debug . assert ( inf . args <= 4 )
834+ Debug . assert ( inf . args <= 4 )
835835
836836 if ( inf . args >= 4 )
837837 this . emit ( "pop {r3}" ) ;
@@ -857,7 +857,7 @@ namespace ts {
857857 this . emit ( "@stackmark retval" )
858858 }
859859
860- ts . Debug . assert ( ( mask & ~ 0xf ) == 0 )
860+ Debug . assert ( ( mask & ~ 0xf ) == 0 )
861861
862862 if ( reglist . length > 0 )
863863 this . emit ( "push {" + reglist . join ( "," ) + "}" )
@@ -874,7 +874,7 @@ namespace ts {
874874 else if ( inf . type == "P" ) {
875875 // ok
876876 }
877- else ts . Debug . fail ( "invalid call type " + inf . type )
877+ else Debug . fail ( "invalid call type " + inf . type )
878878
879879 while ( numMask -- > 0 ) {
880880 this . emitCall ( "bitvm::decr" , 0 ) ;
@@ -896,7 +896,7 @@ namespace ts {
896896 } else if ( name == "JMP" ) {
897897 // ok
898898 } else {
899- ts . Debug . fail ( "bad jmp" ) ;
899+ Debug . fail ( "bad jmp" ) ;
900900 }
901901
902902 this . emit ( "bb " + trg )
@@ -917,17 +917,17 @@ namespace ts {
917917 }
918918
919919 emitMov ( v : number ) {
920- ts . Debug . assert ( 0 <= v && v <= 255 )
920+ Debug . assert ( 0 <= v && v <= 255 )
921921 this . emit ( "movs r0, #" + v )
922922 }
923923
924924 emitAdd ( v : number ) {
925- ts . Debug . assert ( 0 <= v && v <= 255 )
925+ Debug . assert ( 0 <= v && v <= 255 )
926926 this . emit ( "adds r0, #" + v )
927927 }
928928
929929 emitLdPtr ( lbl : string , push = false ) {
930- ts . Debug . assert ( ! ! lbl )
930+ Debug . assert ( ! ! lbl )
931931 this . emit ( "movs r0, " + lbl + "@hi ; ldptr " + lbl )
932932 this . emit ( "lsls r0, r0, #8" )
933933 this . emit ( "adds r0, " + lbl + "@lo ; endldptr" ) ;
@@ -936,7 +936,7 @@ namespace ts {
936936 }
937937
938938 emitInt ( v : number , keepInR0 = false ) {
939- ts . Debug . assert ( v != null ) ;
939+ Debug . assert ( v != null ) ;
940940
941941 var n = Math . floor ( v )
942942 var isNeg = false
@@ -973,7 +973,7 @@ namespace ts {
973973 }
974974
975975 pushLocals ( ) {
976- ts . Debug . assert ( this . prebody == "" )
976+ Debug . assert ( this . prebody == "" )
977977 this . prebody = this . body
978978 this . body = ""
979979 }
@@ -992,7 +992,7 @@ namespace ts {
992992
993993 this . body += suff
994994
995- ts . Debug . assert ( 0 <= len && len < 127 ) ;
995+ Debug . assert ( 0 <= len && len < 127 ) ;
996996 if ( len > 0 ) this . emit ( "add sp, #4*" + len + " ; pop locals " + len )
997997 }
998998 }
@@ -1019,14 +1019,14 @@ namespace ts {
10191019 isDataRecord ( s : string ) {
10201020 if ( ! s ) return false
10211021 var m = / ^ : ......( ..) / . exec ( s )
1022- ts . Debug . assert ( ! ! m )
1022+ Debug . assert ( ! ! m )
10231023 return m [ 1 ] == "00"
10241024 }
10251025
10261026 patchHex ( shortForm : boolean ) {
10271027 var myhex = hex . slice ( 0 , bytecodeStartIdx )
10281028
1029- ts . Debug . assert ( this . buf . length < 32000 )
1029+ Debug . assert ( this . buf . length < 32000 )
10301030
10311031 var ptr = 0
10321032
@@ -1117,7 +1117,7 @@ namespace ts {
11171117 }
11181118
11191119 serialize ( ) {
1120- ts . Debug . assert ( this . csource == "" ) ;
1120+ Debug . assert ( this . csource == "" ) ;
11211121
11221122 this . emit ( "; start" )
11231123 this . emit ( ".hex 708E3B92C615A841C49866C975EE5197" )
0 commit comments