# HG changeset patch # User mir3636 # Date 1516341996 -32400 # Node ID 8edb996bce462539aecb9b989dea2a6e23afd723 # Parent bb495c751e408ebcba1ea25905e1db0b9dbad9bc fix diff -r bb495c751e40 -r 8edb996bce46 Slide/fig/MetaGear.pdf Binary file Slide/fig/MetaGear.pdf has changed diff -r bb495c751e40 -r 8edb996bce46 Slide/fig/gears_structure.pdf Binary file Slide/fig/gears_structure.pdf has changed diff -r bb495c751e40 -r 8edb996bce46 Slide/prosym.html --- a/Slide/prosym.html Fri Jan 19 07:45:21 2018 +0900 +++ b/Slide/prosym.html Fri Jan 19 15:06:36 2018 +0900 @@ -86,7 +86,7 @@ @@ -221,16 +221,9 @@

Gears OS の構成図

- gears_structure + gears_structure
- -
@@ -240,8 +233,34 @@
  • Context とは使用される Code Gear と Data Gear を全て格納した Meta Data Gear である。
  • Gears OSは必要なCode Gear、Data Gearに参照したい場合、このContext を通す必要がある。
  • +
    + gearef +
    -

    message

    + +
    +
    + +

    context の定義

    + +
    /* context define */
    +struct Context {
    +    int codeNum; //実行可能な code の数
    +    __code (**code) (struct Context*); //実行可能な code Gear のリスト
    +    void* heapStart; //Data Gear の Allocate用のヒープ
    +    void* heap;
    +    long heapLimit;
    +    int dataNum; //Data Gear の数
    +    union Data **data; //Data Gear のリスト
    +};
    +
    + +
    @@ -276,6 +295,10 @@

    Interface

    + +
    Stack* createSingleLinkedStack(struct Context* context) {
         struct Stack* stack = new Stack();
         struct SingleLinkedStack* singleLinkedStack = new SingleLinkedStack();
    @@ -290,6 +313,16 @@
         stack->clear = C_clearSingleLinkedStack;
         return stack;
     }
    +
    +__code pushSingleLinkedStack(struct
    +    SingleLinkedStack* stack,union Data* data, __code next(...)) {
    +    Element* element = new Element();
    +    element->next = stack->top;
    +    element->data = data;
    +    stack->top = element;
    +    goto next(...);
    +}
    +
     
    -

    Context、stub Code Gear の自動生成

    - - - - -
    - -

    Meta の生成

    +

    stub Code Gear

    @@ -338,6 +360,17 @@
    +

    Context、stub Code Gear の自動生成

    + + + +
    +
    +

    stub Code Gear の生成

    -

    Context の生成

    +

    Context の生成