Mercurial > hg > Gears > GearsAgda
comparison src/llrb/llrbContext.h @ 72:5c4b9d116eda
use stack for code segment
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 10 Nov 2015 01:59:04 +0900 |
parents | 368306e1bfed |
children | 2667c3251a00 |
comparison
equal
deleted
inserted
replaced
71:6e5b0e4245cc | 72:5c4b9d116eda |
---|---|
1 /* Context definition for llrb example */ | 1 /* Context definition for llrb example */ |
2 #include "stack.h" | |
3 | |
2 #define ALLOCATE_SIZE 100 | 4 #define ALLOCATE_SIZE 100 |
3 | 5 |
4 enum Code { | 6 enum Code { |
5 Code1, | 7 Code1, |
6 Code2, | 8 Code2, |
19 RotateL, | 21 RotateL, |
20 RotateR, | 22 RotateR, |
21 ColorFlip, | 23 ColorFlip, |
22 FixUp, | 24 FixUp, |
23 ChangeRef, | 25 ChangeRef, |
26 Balance1, | |
27 Balance2, | |
28 Balance3, | |
24 Get, | 29 Get, |
25 Delete, | 30 Delete, |
26 DeleteMax, | 31 DeleteMax, |
27 DeleteMin, | 32 DeleteMin, |
28 Replace_d, | 33 Replace_d, |
42 __code (**code) (struct Context*); | 47 __code (**code) (struct Context*); |
43 void* heapStart; | 48 void* heapStart; |
44 void* heap; | 49 void* heap; |
45 long heapLimit; | 50 long heapLimit; |
46 int dataNum; | 51 int dataNum; |
52 stack_ptr code_stack; | |
53 stack_ptr node_stack; | |
47 union Data **data; | 54 union Data **data; |
48 }; | 55 }; |
49 | 56 |
50 union Data { | 57 union Data { |
51 struct Comparable { // inteface | 58 struct Comparable { // inteface |