Mercurial > hg > Papers > 2017 > atton-master
view paper/src/rbtreeContext.h @ 144:060202b21724 default tip
Bookbinding
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 27 Feb 2017 20:29:43 +0900 |
parents | 5510bb043a74 |
children |
line wrap: on
line source
// DataSegments for Red-Black Tree union Data { struct Comparable { // interface enum Code compare; union Data* data; } compare; struct Count { enum Code next; long i; } count; struct Tree { enum Code next; struct Node* root; struct Node* current; struct Node* deleted; int result; } tree; struct Node { // need to tree enum Code next; int key; // comparable data segment int value; struct Node* left; struct Node* right; // need to balancing enum Color { Red, Black, } color; } node; struct Allocate { enum Code next; long size; } allocate; }; // Meta DataSegment struct Context { enum Code next; int codeNum; __code (**code) (struct Context*); void* heapStart; void* heap; long heapLimit; int dataNum; stack_ptr code_stack; stack_ptr node_stack; union Data **data; };