Last change
on this file since 270 was 270, checked in by coas-nagasima, 7 years ago |
mruby版ECNLプロトタイピング・ツールを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
-
Property svn:mime-type
set to
text/x-chdr
|
File size:
1.2 KB
|
Line | |
---|
1 | /*
|
---|
2 | ** mruby/irep.h - mrb_irep structure
|
---|
3 | **
|
---|
4 | ** See Copyright Notice in mruby.h
|
---|
5 | */
|
---|
6 |
|
---|
7 | #ifndef MRUBY_IREP_H
|
---|
8 | #define MRUBY_IREP_H
|
---|
9 |
|
---|
10 | #include "mruby/common.h"
|
---|
11 | #include "mruby/compile.h"
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Compiled mruby scripts.
|
---|
15 | */
|
---|
16 | MRB_BEGIN_DECL
|
---|
17 |
|
---|
18 | enum irep_pool_type {
|
---|
19 | IREP_TT_STRING,
|
---|
20 | IREP_TT_FIXNUM,
|
---|
21 | IREP_TT_FLOAT,
|
---|
22 | };
|
---|
23 |
|
---|
24 | struct mrb_locals {
|
---|
25 | mrb_sym name;
|
---|
26 | uint16_t r;
|
---|
27 | };
|
---|
28 |
|
---|
29 | /* Program data array struct */
|
---|
30 | typedef struct mrb_irep {
|
---|
31 | uint16_t nlocals; /* Number of local variables */
|
---|
32 | uint16_t nregs; /* Number of register variables */
|
---|
33 | uint8_t flags;
|
---|
34 |
|
---|
35 | mrb_code *iseq;
|
---|
36 | mrb_value *pool;
|
---|
37 | mrb_sym *syms;
|
---|
38 | struct mrb_irep **reps;
|
---|
39 |
|
---|
40 | struct mrb_locals *lv;
|
---|
41 | /* debug info */
|
---|
42 | const char *filename;
|
---|
43 | uint16_t *lines;
|
---|
44 | struct mrb_irep_debug_info* debug_info;
|
---|
45 |
|
---|
46 | size_t ilen, plen, slen, rlen, refcnt;
|
---|
47 | } mrb_irep;
|
---|
48 |
|
---|
49 | #define MRB_ISEQ_NO_FREE 1
|
---|
50 |
|
---|
51 | MRB_API mrb_irep *mrb_add_irep(mrb_state *mrb);
|
---|
52 | MRB_API mrb_value mrb_load_irep(mrb_state*, const uint8_t*);
|
---|
53 | MRB_API mrb_value mrb_load_irep_cxt(mrb_state*, const uint8_t*, mrbc_context*);
|
---|
54 | void mrb_irep_free(mrb_state*, struct mrb_irep*);
|
---|
55 | void mrb_irep_incref(mrb_state*, struct mrb_irep*);
|
---|
56 | void mrb_irep_decref(mrb_state*, struct mrb_irep*);
|
---|
57 |
|
---|
58 | MRB_END_DECL
|
---|
59 |
|
---|
60 | #endif /* MRUBY_IREP_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.