File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 13
13
#include "bc0.h"
14
14
#include "bc.h"
15
15
16
+ // Value stack grows up (this makes it incompatible with native C stack, but
17
+ // makes sure that arguments to functions are in natural order arg1..argN
18
+ // (Python semantics mandates left-to-right evaluation order, including for
19
+ // function arguments). Stack pointer is pre-incremented and points at the
20
+ // top element.
21
+ // Exception stack also grows up, top element is also pointed at.
22
+
16
23
// Exception stack entry
17
24
typedef struct _mp_exc_stack {
18
25
const byte * handler ;
@@ -23,9 +30,6 @@ typedef struct _mp_exc_stack {
23
30
byte opcode ;
24
31
} mp_exc_stack ;
25
32
26
- // (value) stack grows down (to be compatible with native code when passing pointers to the stack), top element is pointed to
27
- // exception stack grows up, top element is pointed to
28
-
29
33
#define DECODE_UINT do { unum = *ip++; if (unum > 127) { unum = ((unum & 0x3f) << 8) | (*ip++); } } while (0)
30
34
#define DECODE_ULABEL do { unum = (ip[0] | (ip[1] << 8)); ip += 2; } while (0)
31
35
#define DECODE_SLABEL do { unum = (ip[0] | (ip[1] << 8)) - 0x8000; ip += 2; } while (0)
You can’t perform that action at this time.
0 commit comments