目次

Xemb

// text type          : Program Code
// compiled_text type : Program Byte Code
// return type        : Code
#ifdef XTAL_USE_COMPILED_EMB
Xemb(text, compiled_text) exec_compiled_source(compiled_text);
#else // XTAL_USE_COMPILED_EMB
Xemb(text, compiled_text) exec_source(text);
#endif

埋め込みバイトコードとソースコードをコンパイル時に選択することが出来る。バイトコードを埋め込む場合はXTAL_USE_COMPILED_EMBをdefineし、そうでなければdefineしない。

Example

以下のコードは、バイトコードが正確なものではないので、コンパイルはできますが実行できません。

C++

void exec_xtal(){
    const CodePtr& code(Xemb((
        return [0, 2, 3, 4];
    ),
        "\xdf\x78\x74\x61..."
    ));
}
reference/xemb.txt · 最終更新: 2011/09/03 21:30 by sukai
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0