File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313#include "bc0.h"
1414#include "bc.h"
1515
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+
1623// Exception stack entry
1724typedef struct _mp_exc_stack {
1825 const byte * handler ;
@@ -23,9 +30,6 @@ typedef struct _mp_exc_stack {
2330 byte opcode ;
2431} mp_exc_stack ;
2532
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-
2933#define DECODE_UINT do { unum = *ip++; if (unum > 127) { unum = ((unum & 0x3f) << 8) | (*ip++); } } while (0)
3034#define DECODE_ULABEL do { unum = (ip[0] | (ip[1] << 8)); ip += 2; } while (0)
3135#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