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;
- return 0s8 + a + v;
- }
- func main()
- {
- dump( _test( 1 ) );
- }
- /// BYTECODE ///
- FUNC (struct=6 op=30 opsub=0 tt=75)
- {
- name = '_test'
- bytecode:
- DECLARG <int32> a [12]
- DECLVAR <int8> v [9]
- CONST <uint8> 0 [16] : 05
- NEGATE <int32> 1 [18] <= 0 [16]
- COPY <> v [9] <= 1 [18]
- CONST <int8> 2 [19] : 00
- ADD <int32> 3 [21] <= 2 [19], a [12]
- ADD <int32> 4 [22] <= 3 [21], v [9]
- RETURN 4 [22]
- }
- FUNC (struct=6 op=30 opsub=0 tt=75)
- {
- name = 'main'
- bytecode:
- CONST <uint8> 0 [16] : 01
- FCALL <int32> 1 [18] <= func:_test [11] args(1): 0 [16]
- FCALL <> [0] <= func:dump [8] args(1): 1 [18]
- }
- /// GENERATED C CODE ///
- extern void Idump( Iint64 Iv );
- Iint32 _Itest( Iint32 Ia );
- void Imain();
- Iint32 _Itest( Iint32 Ia )
- {
- Iint8 Iv;
- const Iuint8 I0 = 5;
- Iint32 I1 = -I0;
- Iv = I1;
- const Iint8 I2 = 0;
- Iint32 I3 = I2 + Ia;
- Iint32 I4 = I3 + Iv;
- return I4;
- }
- void Imain()
- {
- const Iuint8 I0 = 1;
- Iint32 I1 = _Itest( I0 );
- Idump( I1 );
- }
- /// OUTPUT ///
- int (-4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement