Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// CODE ///
- extern func dump( v : int64 );
- func _test( a : int32 ) : int32
- {
- var v : int8 = -5;
- while( v < 0 )
- {
- dump( v + a );
- v += 1;
- }
- return 0s8 + a + v;
- }
- func main()
- {
- dump( sizeof( uint16 ) );
- dump( sizeof( 0s8 ) );
- dump( sizeof( 0s64 ) );
- dump( sizeof( 0f32 ) );
- var dbl : float64;
- dump( sizeof( dbl ) );
- dump( _test( 1 ) );
- }
- /// GENERATED C CODE ///
- Iint32 _Itest( Iint32 Ia )
- {
- Iint8 Iv;
- const Iuint8 I0 = 5;
- Iint32 I1 = -I0;
- Iv = I1;
- lbl_0:;
- const Iuint8 I2 = 0;
- Ibool I3 = Iv < I2;
- if( !I3 ) goto lbl_1;
- Iint32 I4 = Iv + Ia;
- Idump( I4 );
- const Iuint8 I5 = 1;
- Iv = Iv + I5;
- goto lbl_0;
- lbl_1:;
- const Iint8 I6 = 0;
- Iint32 I7 = I6 + Ia;
- Iint32 I8 = I7 + Iv;
- return I8;
- }
- void Imain()
- {
- Ifloat64 Idbl;
- const Iint32 I0 = 2;
- Idump( I0 );
- const Iint8 I1 = 0;
- const Iint32 I2 = 1;
- Idump( I2 );
- const Iint64 I3 = 0;
- const Iint32 I4 = 8;
- Idump( I4 );
- const Ifloat32 I5 = 0.000000000000000000;
- const Iint32 I6 = 4;
- Idump( I6 );
- const Iint32 I7 = 8;
- Idump( I7 );
- const Iuint8 I8 = 1;
- Iint32 I9 = _Itest( I8 );
- Idump( I9 );
- }
- /// OUTPUT ///
- int (2)
- int (1)
- int (8)
- int (4)
- int (8)
- int (-4)
- int (-3)
- int (-2)
- int (-1)
- int (0)
- int (1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement