debase-ruby_core_source 0.9.9 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/ccan/list/list.h +28 -166
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/constant.h +3 -10
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/eval_intern.h +49 -89
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/gc.h +1 -8
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/id.h +5 -15
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/insns.inc +107 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/insns_info.inc +45 -89
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/internal.h +164 -666
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/iseq.h +158 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/method.h +144 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/node.h +42 -18
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/node_name.inc +6 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/opt_sc.inc +0 -40
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/optunifs.inc +0 -5
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/parse.h +8 -28
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/probes_helper.h +67 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regenc.h +16 -16
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regint.h +10 -33
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regparse.h +1 -5
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/ruby_atomic.h +5 -68
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/symbol.h +13 -33
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/thread_pthread.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/transcode_data.h +7 -23
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/version.h +10 -31
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm.inc +497 -542
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm_core.h +305 -784
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm_insnhelper.h +56 -50
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/vm_opts.h +7 -8
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/vmtc.inc +0 -5
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/constant.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/eval_intern.h +3 -4
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/gc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/id.h +0 -9
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/insns.inc +46 -48
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/insns_info.inc +0 -20
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/internal.h +58 -290
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/iseq.h +15 -18
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/method.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/node.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/opt_sc.inc +0 -16
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/optunifs.inc +0 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/parse.h +8 -27
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/regenc.h +14 -14
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/regint.h +0 -8
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.3.5-p376/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/symbol.h +3 -3
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/version.h +9 -27
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm.inc +255 -264
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_call_iseq_optimized.inc +5 -5
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_core.h +37 -28
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_insnhelper.h +32 -16
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_opts.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vmtc.inc +0 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/constant.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/eval_intern.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/gc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/id.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/insns.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/insns_info.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/internal.h +116 -51
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/iseq.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/method.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/node.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/opt_sc.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/parse.h +8 -27
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/regenc.h +79 -67
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/regint.h +187 -244
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/regparse.h +30 -27
- data/lib/debase/ruby_core_source/ruby-2.4.2-p198/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/ruby_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/version.h +6 -6
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm.inc +37 -34
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/vm_call_iseq_optimized.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_core.h +9 -7
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_insnhelper.h +30 -14
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/vm_opts.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/vmtc.inc +0 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +138 -143
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/method.h +0 -213
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview2/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview2/ruby_assert.h +0 -54
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/encindex.h +0 -67
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/id_table.h +0 -31
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/insns.inc +0 -112
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/iseq.h +0 -252
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/probes_helper.h +0 -43
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/ruby_assert.h +0 -54
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/vm_call_iseq_optimized.inc +0 -212
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
|
|
3
|
+
iseq.h -
|
|
4
|
+
|
|
5
|
+
$Author: normal $
|
|
6
|
+
created at: 04/01/01 23:36:57 JST
|
|
7
|
+
|
|
8
|
+
Copyright (C) 2004-2008 Koichi Sasada
|
|
9
|
+
|
|
10
|
+
**********************************************************************/
|
|
11
|
+
|
|
12
|
+
#ifndef RUBY_COMPILE_H
|
|
13
|
+
#define RUBY_COMPILE_H
|
|
14
|
+
|
|
15
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
|
16
|
+
|
|
17
|
+
/* compile.c */
|
|
18
|
+
VALUE rb_iseq_compile_node(VALUE self, NODE *node);
|
|
19
|
+
int rb_iseq_translate_threaded_code(rb_iseq_t *iseq);
|
|
20
|
+
VALUE *rb_iseq_original_iseq(rb_iseq_t *iseq);
|
|
21
|
+
VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
|
|
22
|
+
VALUE locals, VALUE args,
|
|
23
|
+
VALUE exception, VALUE body);
|
|
24
|
+
|
|
25
|
+
/* iseq.c */
|
|
26
|
+
void rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj);
|
|
27
|
+
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
|
|
28
|
+
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
|
|
29
|
+
struct st_table *ruby_insn_make_insn_table(void);
|
|
30
|
+
unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
|
|
31
|
+
|
|
32
|
+
int rb_iseq_line_trace_each(VALUE iseqval, int (*func)(int line, rb_event_flag_t *events_ptr, void *d), void *data);
|
|
33
|
+
VALUE rb_iseq_line_trace_all(VALUE iseqval);
|
|
34
|
+
VALUE rb_iseq_line_trace_specify(VALUE iseqval, VALUE pos, VALUE set);
|
|
35
|
+
|
|
36
|
+
/* proc.c */
|
|
37
|
+
rb_iseq_t *rb_method_get_iseq(VALUE body);
|
|
38
|
+
rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
|
|
39
|
+
|
|
40
|
+
struct rb_compile_option_struct {
|
|
41
|
+
int inline_const_cache;
|
|
42
|
+
int peephole_optimization;
|
|
43
|
+
int tailcall_optimization;
|
|
44
|
+
int specialized_instruction;
|
|
45
|
+
int operands_unification;
|
|
46
|
+
int instructions_unification;
|
|
47
|
+
int stack_caching;
|
|
48
|
+
int trace_instruction;
|
|
49
|
+
int debug_level;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
struct iseq_line_info_entry {
|
|
53
|
+
unsigned int position;
|
|
54
|
+
unsigned int line_no;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
struct iseq_catch_table_entry {
|
|
58
|
+
enum catch_type {
|
|
59
|
+
CATCH_TYPE_RESCUE = INT2FIX(1),
|
|
60
|
+
CATCH_TYPE_ENSURE = INT2FIX(2),
|
|
61
|
+
CATCH_TYPE_RETRY = INT2FIX(3),
|
|
62
|
+
CATCH_TYPE_BREAK = INT2FIX(4),
|
|
63
|
+
CATCH_TYPE_REDO = INT2FIX(5),
|
|
64
|
+
CATCH_TYPE_NEXT = INT2FIX(6)
|
|
65
|
+
} type;
|
|
66
|
+
VALUE iseq;
|
|
67
|
+
unsigned int start;
|
|
68
|
+
unsigned int end;
|
|
69
|
+
unsigned int cont;
|
|
70
|
+
unsigned int sp;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
PACKED_STRUCT_UNALIGNED(struct iseq_catch_table {
|
|
74
|
+
int size;
|
|
75
|
+
struct iseq_catch_table_entry entries[1]; /* flexible array */
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
static inline int
|
|
79
|
+
iseq_catch_table_bytes(int n)
|
|
80
|
+
{
|
|
81
|
+
enum {
|
|
82
|
+
catch_table_entries_max = (INT_MAX - sizeof(struct iseq_catch_table)) / sizeof(struct iseq_catch_table_entry)
|
|
83
|
+
};
|
|
84
|
+
if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
|
|
85
|
+
return (int)(sizeof(struct iseq_catch_table) +
|
|
86
|
+
(n - 1) * sizeof(struct iseq_catch_table_entry));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
|
|
90
|
+
|
|
91
|
+
struct iseq_compile_data_storage {
|
|
92
|
+
struct iseq_compile_data_storage *next;
|
|
93
|
+
unsigned int pos;
|
|
94
|
+
unsigned int size;
|
|
95
|
+
char buff[1]; /* flexible array */
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/* account for flexible array */
|
|
99
|
+
#define SIZEOF_ISEQ_COMPILE_DATA_STORAGE \
|
|
100
|
+
(sizeof(struct iseq_compile_data_storage) - 1)
|
|
101
|
+
|
|
102
|
+
struct iseq_compile_data {
|
|
103
|
+
/* GC is needed */
|
|
104
|
+
const VALUE err_info;
|
|
105
|
+
VALUE mark_ary;
|
|
106
|
+
const VALUE catch_table_ary; /* Array */
|
|
107
|
+
|
|
108
|
+
/* GC is not needed */
|
|
109
|
+
struct iseq_label_data *start_label;
|
|
110
|
+
struct iseq_label_data *end_label;
|
|
111
|
+
struct iseq_label_data *redo_label;
|
|
112
|
+
VALUE current_block;
|
|
113
|
+
VALUE ensure_node;
|
|
114
|
+
VALUE for_iseq;
|
|
115
|
+
struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
|
|
116
|
+
int loopval_popped; /* used by NODE_BREAK */
|
|
117
|
+
int cached_const;
|
|
118
|
+
struct iseq_compile_data_storage *storage_head;
|
|
119
|
+
struct iseq_compile_data_storage *storage_current;
|
|
120
|
+
int last_line;
|
|
121
|
+
int last_coverable_line;
|
|
122
|
+
int label_no;
|
|
123
|
+
int node_level;
|
|
124
|
+
const rb_compile_option_t *option;
|
|
125
|
+
#if SUPPORT_JOKE
|
|
126
|
+
st_table *labels_table;
|
|
127
|
+
#endif
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/* defined? */
|
|
131
|
+
|
|
132
|
+
enum defined_type {
|
|
133
|
+
DEFINED_NIL = 1,
|
|
134
|
+
DEFINED_IVAR,
|
|
135
|
+
DEFINED_LVAR,
|
|
136
|
+
DEFINED_GVAR,
|
|
137
|
+
DEFINED_CVAR,
|
|
138
|
+
DEFINED_CONST,
|
|
139
|
+
DEFINED_METHOD,
|
|
140
|
+
DEFINED_YIELD,
|
|
141
|
+
DEFINED_ZSUPER,
|
|
142
|
+
DEFINED_SELF,
|
|
143
|
+
DEFINED_TRUE,
|
|
144
|
+
DEFINED_FALSE,
|
|
145
|
+
DEFINED_ASGN,
|
|
146
|
+
DEFINED_EXPR,
|
|
147
|
+
DEFINED_IVAR2,
|
|
148
|
+
DEFINED_REF,
|
|
149
|
+
DEFINED_FUNC
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
VALUE rb_iseq_defined_string(enum defined_type type);
|
|
153
|
+
|
|
154
|
+
#define DEFAULT_SPECIAL_VAR_COUNT 2
|
|
155
|
+
|
|
156
|
+
RUBY_SYMBOL_EXPORT_END
|
|
157
|
+
|
|
158
|
+
#endif /* RUBY_COMPILE_H */
|
|
File without changes
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
|
|
3
|
+
method.h -
|
|
4
|
+
|
|
5
|
+
$Author: naruse $
|
|
6
|
+
created at: Wed Jul 15 20:02:33 2009
|
|
7
|
+
|
|
8
|
+
Copyright (C) 2009 Koichi Sasada
|
|
9
|
+
|
|
10
|
+
**********************************************************************/
|
|
11
|
+
#ifndef METHOD_H
|
|
12
|
+
#define METHOD_H
|
|
13
|
+
|
|
14
|
+
#include "internal.h"
|
|
15
|
+
|
|
16
|
+
#ifndef END_OF_ENUMERATION
|
|
17
|
+
# if defined(__GNUC__) &&! defined(__STRICT_ANSI__)
|
|
18
|
+
# define END_OF_ENUMERATION(key)
|
|
19
|
+
# else
|
|
20
|
+
# define END_OF_ENUMERATION(key) END_OF_##key##_PLACEHOLDER = 0
|
|
21
|
+
# endif
|
|
22
|
+
#endif
|
|
23
|
+
|
|
24
|
+
typedef enum {
|
|
25
|
+
NOEX_PUBLIC = 0x00,
|
|
26
|
+
NOEX_NOSUPER = 0x01,
|
|
27
|
+
NOEX_PRIVATE = 0x02,
|
|
28
|
+
NOEX_PROTECTED = 0x04,
|
|
29
|
+
NOEX_MASK = 0x06,
|
|
30
|
+
NOEX_BASIC = 0x08,
|
|
31
|
+
NOEX_UNDEF = NOEX_NOSUPER,
|
|
32
|
+
NOEX_MODFUNC = 0x12,
|
|
33
|
+
NOEX_SUPER = 0x20,
|
|
34
|
+
NOEX_VCALL = 0x40,
|
|
35
|
+
NOEX_RESPONDS = 0x80,
|
|
36
|
+
|
|
37
|
+
NOEX_BIT_WIDTH = 8,
|
|
38
|
+
NOEX_SAFE_SHIFT_OFFSET = ((NOEX_BIT_WIDTH+3)/4)*4 /* round up to nibble */
|
|
39
|
+
} rb_method_flag_t;
|
|
40
|
+
|
|
41
|
+
#define NOEX_SAFE(n) ((int)((n) >> NOEX_SAFE_SHIFT_OFFSET) & 0x0F)
|
|
42
|
+
#define NOEX_WITH(n, s) (((s) << NOEX_SAFE_SHIFT_OFFSET) | (n) | (ruby_running ? 0 : NOEX_BASIC))
|
|
43
|
+
#define NOEX_WITH_SAFE(n) NOEX_WITH((n), rb_safe_level())
|
|
44
|
+
|
|
45
|
+
/* method data type */
|
|
46
|
+
|
|
47
|
+
typedef enum {
|
|
48
|
+
VM_METHOD_TYPE_ISEQ,
|
|
49
|
+
VM_METHOD_TYPE_CFUNC,
|
|
50
|
+
VM_METHOD_TYPE_ATTRSET,
|
|
51
|
+
VM_METHOD_TYPE_IVAR,
|
|
52
|
+
VM_METHOD_TYPE_BMETHOD,
|
|
53
|
+
VM_METHOD_TYPE_ZSUPER,
|
|
54
|
+
VM_METHOD_TYPE_UNDEF,
|
|
55
|
+
VM_METHOD_TYPE_NOTIMPLEMENTED,
|
|
56
|
+
VM_METHOD_TYPE_OPTIMIZED, /* Kernel#send, Proc#call, etc */
|
|
57
|
+
VM_METHOD_TYPE_MISSING, /* wrapper for method_missing(id) */
|
|
58
|
+
VM_METHOD_TYPE_REFINED,
|
|
59
|
+
|
|
60
|
+
END_OF_ENUMERATION(VM_METHOD_TYPE)
|
|
61
|
+
} rb_method_type_t;
|
|
62
|
+
|
|
63
|
+
struct rb_call_info_struct;
|
|
64
|
+
|
|
65
|
+
typedef struct rb_method_cfunc_struct {
|
|
66
|
+
VALUE (*func)(ANYARGS);
|
|
67
|
+
VALUE (*invoker)(VALUE (*func)(ANYARGS), VALUE recv, int argc, const VALUE *argv);
|
|
68
|
+
int argc;
|
|
69
|
+
} rb_method_cfunc_t;
|
|
70
|
+
|
|
71
|
+
typedef struct rb_method_attr_struct {
|
|
72
|
+
ID id;
|
|
73
|
+
const VALUE location;
|
|
74
|
+
} rb_method_attr_t;
|
|
75
|
+
|
|
76
|
+
typedef struct rb_iseq_struct rb_iseq_t;
|
|
77
|
+
|
|
78
|
+
typedef struct rb_method_definition_struct {
|
|
79
|
+
rb_method_type_t type; /* method type */
|
|
80
|
+
int alias_count;
|
|
81
|
+
ID original_id;
|
|
82
|
+
union {
|
|
83
|
+
rb_iseq_t * const iseq; /* should be mark */
|
|
84
|
+
rb_method_cfunc_t cfunc;
|
|
85
|
+
rb_method_attr_t attr;
|
|
86
|
+
const VALUE proc; /* should be mark */
|
|
87
|
+
enum method_optimized_type {
|
|
88
|
+
OPTIMIZED_METHOD_TYPE_SEND,
|
|
89
|
+
OPTIMIZED_METHOD_TYPE_CALL,
|
|
90
|
+
|
|
91
|
+
OPTIMIZED_METHOD_TYPE__MAX
|
|
92
|
+
} optimize_type;
|
|
93
|
+
struct rb_method_entry_struct *orig_me;
|
|
94
|
+
} body;
|
|
95
|
+
} rb_method_definition_t;
|
|
96
|
+
|
|
97
|
+
typedef struct rb_method_entry_struct {
|
|
98
|
+
rb_method_flag_t flag;
|
|
99
|
+
char mark;
|
|
100
|
+
rb_method_definition_t *def;
|
|
101
|
+
ID called_id;
|
|
102
|
+
VALUE klass; /* should be mark */
|
|
103
|
+
} rb_method_entry_t;
|
|
104
|
+
|
|
105
|
+
struct unlinked_method_entry_list_entry {
|
|
106
|
+
struct unlinked_method_entry_list_entry *next;
|
|
107
|
+
rb_method_entry_t *me;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
|
|
111
|
+
#define UNDEFINED_REFINED_METHOD_P(def) \
|
|
112
|
+
((def)->type == VM_METHOD_TYPE_REFINED && \
|
|
113
|
+
UNDEFINED_METHOD_ENTRY_P((def)->body.orig_me))
|
|
114
|
+
|
|
115
|
+
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex);
|
|
116
|
+
rb_method_entry_t *rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_flag_t noex);
|
|
117
|
+
rb_method_entry_t *rb_method_entry(VALUE klass, ID id, VALUE *define_class_ptr);
|
|
118
|
+
rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
|
|
119
|
+
void rb_add_refined_method_entry(VALUE refined_class, ID mid);
|
|
120
|
+
rb_method_entry_t *rb_resolve_refined_method(VALUE refinements,
|
|
121
|
+
const rb_method_entry_t *me,
|
|
122
|
+
VALUE *defined_class_ptr);
|
|
123
|
+
rb_method_entry_t *rb_method_entry_with_refinements(VALUE klass, ID id,
|
|
124
|
+
VALUE *defined_class_ptr);
|
|
125
|
+
rb_method_entry_t *rb_method_entry_without_refinements(VALUE klass, ID id,
|
|
126
|
+
VALUE *defined_class_ptr);
|
|
127
|
+
|
|
128
|
+
rb_method_entry_t *rb_method_entry_get_without_cache(VALUE klass, ID id, VALUE *define_class_ptr);
|
|
129
|
+
rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_flag_t noex);
|
|
130
|
+
|
|
131
|
+
int rb_method_entry_arity(const rb_method_entry_t *me);
|
|
132
|
+
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2);
|
|
133
|
+
st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me);
|
|
134
|
+
|
|
135
|
+
VALUE rb_method_entry_location(rb_method_entry_t *me);
|
|
136
|
+
VALUE rb_mod_method_location(VALUE mod, ID id);
|
|
137
|
+
VALUE rb_obj_method_location(VALUE obj, ID id);
|
|
138
|
+
|
|
139
|
+
void rb_mark_method_entry(const rb_method_entry_t *me);
|
|
140
|
+
void rb_free_method_entry(rb_method_entry_t *me);
|
|
141
|
+
void rb_sweep_method_entry(void *vm);
|
|
142
|
+
void rb_free_m_tbl_wrapper(struct method_table_wrapper *wrapper);
|
|
143
|
+
|
|
144
|
+
#endif /* METHOD_H */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
node.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: akr $
|
|
6
6
|
created at: Fri May 28 15:14:02 JST 1993
|
|
7
7
|
|
|
8
8
|
Copyright (C) 1993-2007 Yukihiro Matsumoto
|
|
@@ -96,8 +96,6 @@ enum node_type {
|
|
|
96
96
|
#define NODE_FCALL NODE_FCALL
|
|
97
97
|
NODE_VCALL,
|
|
98
98
|
#define NODE_VCALL NODE_VCALL
|
|
99
|
-
NODE_QCALL,
|
|
100
|
-
#define NODE_QCALL NODE_QCALL
|
|
101
99
|
NODE_SUPER,
|
|
102
100
|
#define NODE_SUPER NODE_SUPER
|
|
103
101
|
NODE_ZSUPER,
|
|
@@ -194,6 +192,8 @@ enum node_type {
|
|
|
194
192
|
#define NODE_COLON2 NODE_COLON2
|
|
195
193
|
NODE_COLON3,
|
|
196
194
|
#define NODE_COLON3 NODE_COLON3
|
|
195
|
+
NODE_CREF,
|
|
196
|
+
#define NODE_CREF NODE_CREF
|
|
197
197
|
NODE_DOT2,
|
|
198
198
|
#define NODE_DOT2 NODE_DOT2
|
|
199
199
|
NODE_DOT3,
|
|
@@ -220,6 +220,10 @@ enum node_type {
|
|
|
220
220
|
#define NODE_ALLOCA NODE_ALLOCA
|
|
221
221
|
NODE_BMETHOD,
|
|
222
222
|
#define NODE_BMETHOD NODE_BMETHOD
|
|
223
|
+
NODE_MEMO,
|
|
224
|
+
#define NODE_MEMO NODE_MEMO
|
|
225
|
+
NODE_IFUNC,
|
|
226
|
+
#define NODE_IFUNC NODE_IFUNC
|
|
223
227
|
NODE_DSYM,
|
|
224
228
|
#define NODE_DSYM NODE_DSYM
|
|
225
229
|
NODE_ATTRASGN,
|
|
@@ -261,12 +265,16 @@ typedef struct RNode {
|
|
|
261
265
|
|
|
262
266
|
#define RNODE(obj) (R_CAST(RNode)(obj))
|
|
263
267
|
|
|
264
|
-
/* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: TAINT, 9:
|
|
268
|
+
/* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: TAINT, 9: UNTRUSTERD, 10: EXIVAR, 11: FREEZE */
|
|
265
269
|
/* NODE_FL: 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: NODE_FL_NEWLINE|NODE_FL_CREF_PUSHED_BY_EVAL,
|
|
266
270
|
* 8..14: nd_type,
|
|
267
|
-
* 15..: nd_line
|
|
271
|
+
* 15..: nd_line or
|
|
272
|
+
* 15: NODE_FL_CREF_PUSHED_BY_EVAL
|
|
273
|
+
* 16: NODE_FL_CREF_OMOD_SHARED
|
|
268
274
|
*/
|
|
269
|
-
#define NODE_FL_NEWLINE
|
|
275
|
+
#define NODE_FL_NEWLINE (((VALUE)1)<<7)
|
|
276
|
+
#define NODE_FL_CREF_PUSHED_BY_EVAL (((VALUE)1)<<15)
|
|
277
|
+
#define NODE_FL_CREF_OMOD_SHARED (((VALUE)1)<<16)
|
|
270
278
|
|
|
271
279
|
#define NODE_TYPESHIFT 8
|
|
272
280
|
#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
|
|
@@ -281,7 +289,7 @@ typedef struct RNode {
|
|
|
281
289
|
#define nd_set_line(n,l) \
|
|
282
290
|
RNODE(n)->flags=((RNODE(n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
|
|
283
291
|
|
|
284
|
-
#define
|
|
292
|
+
#define nd_refinements nd_reserved
|
|
285
293
|
|
|
286
294
|
#define nd_head u1.node
|
|
287
295
|
#define nd_alen u2.argc
|
|
@@ -339,7 +347,7 @@ typedef struct RNode {
|
|
|
339
347
|
#define nd_super u3.node
|
|
340
348
|
|
|
341
349
|
#define nd_modl u1.id
|
|
342
|
-
#define
|
|
350
|
+
#define nd_clss u1.value
|
|
343
351
|
|
|
344
352
|
#define nd_beg u1.node
|
|
345
353
|
#define nd_end u2.node
|
|
@@ -351,12 +359,13 @@ typedef struct RNode {
|
|
|
351
359
|
#define nd_tag u1.id
|
|
352
360
|
#define nd_tval u2.value
|
|
353
361
|
|
|
354
|
-
#define
|
|
362
|
+
#define nd_visi u2.argc
|
|
355
363
|
|
|
356
364
|
#define NEW_NODE(t,a0,a1,a2) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2))
|
|
357
365
|
|
|
358
366
|
#define NEW_DEFN(i,a,d,p) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d))
|
|
359
367
|
#define NEW_DEFS(r,i,a,d) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d))
|
|
368
|
+
#define NEW_IFUNC(f,c) NEW_NODE(NODE_IFUNC,f,c,0)
|
|
360
369
|
#define NEW_SCOPE(a,b) NEW_NODE(NODE_SCOPE,local_tbl(),b,a)
|
|
361
370
|
#define NEW_BLOCK(a) NEW_NODE(NODE_BLOCK,a,0,0)
|
|
362
371
|
#define NEW_IF(c,t,e) NEW_NODE(NODE_IF,c,t,e)
|
|
@@ -394,8 +403,8 @@ typedef struct RNode {
|
|
|
394
403
|
#define NEW_CVASGN(v,val) NEW_NODE(NODE_CVASGN,v,val,0)
|
|
395
404
|
#define NEW_CVDECL(v,val) NEW_NODE(NODE_CVDECL,v,val,0)
|
|
396
405
|
#define NEW_OP_ASGN1(p,id,a) NEW_NODE(NODE_OP_ASGN1,p,id,a)
|
|
397
|
-
#define NEW_OP_ASGN2(r,
|
|
398
|
-
#define NEW_OP_ASGN22(i,o
|
|
406
|
+
#define NEW_OP_ASGN2(r,i,o,val) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o))
|
|
407
|
+
#define NEW_OP_ASGN22(i,o) NEW_NODE(NODE_OP_ASGN2,i,o,rb_id_attrset(i))
|
|
399
408
|
#define NEW_OP_ASGN_OR(i,val) NEW_NODE(NODE_OP_ASGN_OR,i,val,0)
|
|
400
409
|
#define NEW_OP_ASGN_AND(i,val) NEW_NODE(NODE_OP_ASGN_AND,i,val,0)
|
|
401
410
|
#define NEW_OP_CDECL(v,op,val) NEW_NODE(NODE_OP_CDECL,v,val,op)
|
|
@@ -440,6 +449,7 @@ typedef struct RNode {
|
|
|
440
449
|
#define NEW_MODULE(n,b) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b),0)
|
|
441
450
|
#define NEW_COLON2(c,i) NEW_NODE(NODE_COLON2,c,i,0)
|
|
442
451
|
#define NEW_COLON3(i) NEW_NODE(NODE_COLON3,0,i,0)
|
|
452
|
+
#define NEW_CREF(a) NEW_NODE(NODE_CREF,a,0,0)
|
|
443
453
|
#define NEW_DOT2(b,e) NEW_NODE(NODE_DOT2,b,e,0)
|
|
444
454
|
#define NEW_DOT3(b,e) NEW_NODE(NODE_DOT3,b,e,0)
|
|
445
455
|
#define NEW_SELF() NEW_NODE(NODE_SELF,0,0,0)
|
|
@@ -452,7 +462,13 @@ typedef struct RNode {
|
|
|
452
462
|
#define NEW_POSTEXE(b) NEW_NODE(NODE_POSTEXE,0,b,0)
|
|
453
463
|
#define NEW_BMETHOD(b) NEW_NODE(NODE_BMETHOD,0,0,b)
|
|
454
464
|
#define NEW_ATTRASGN(r,m,a) NEW_NODE(NODE_ATTRASGN,r,m,a)
|
|
455
|
-
#define NEW_PRELUDE(p,b
|
|
465
|
+
#define NEW_PRELUDE(p,b) NEW_NODE(NODE_PRELUDE,p,b,0)
|
|
466
|
+
#define NEW_MEMO(a,b,c) NEW_NODE(NODE_MEMO,a,b,c)
|
|
467
|
+
|
|
468
|
+
#define roomof(x, y) ((sizeof(x) + sizeof(y) - 1) / sizeof(y))
|
|
469
|
+
#define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
|
|
470
|
+
#define NEW_MEMO_FOR(type, value) \
|
|
471
|
+
((value) = rb_ary_tmp_new_fill(roomof(type, VALUE)), MEMO_FOR(type, value))
|
|
456
472
|
|
|
457
473
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
458
474
|
|
|
@@ -465,11 +481,11 @@ VALUE rb_parser_dump_tree(NODE *node, int comment);
|
|
|
465
481
|
NODE *rb_parser_append_print(VALUE, NODE *);
|
|
466
482
|
NODE *rb_parser_while_loop(VALUE, NODE *, int, int);
|
|
467
483
|
|
|
468
|
-
NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
|
|
469
|
-
NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int);
|
|
470
|
-
NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int);
|
|
471
|
-
NODE *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
|
|
472
|
-
NODE *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
|
|
484
|
+
NODE *rb_parser_compile_cstr(volatile VALUE, const char*, const char*, int, int);
|
|
485
|
+
NODE *rb_parser_compile_string(volatile VALUE, const char*, VALUE, int);
|
|
486
|
+
NODE *rb_parser_compile_file(volatile VALUE, const char*, VALUE, int);
|
|
487
|
+
NODE *rb_parser_compile_string_path(volatile VALUE vparser, VALUE fname, VALUE src, int line);
|
|
488
|
+
NODE *rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE input, int line);
|
|
473
489
|
|
|
474
490
|
NODE *rb_compile_cstr(const char*, const char*, int, int);
|
|
475
491
|
NODE *rb_compile_string(const char*, VALUE, int);
|
|
@@ -481,6 +497,15 @@ void rb_gc_free_node(VALUE obj);
|
|
|
481
497
|
size_t rb_node_memsize(VALUE obj);
|
|
482
498
|
VALUE rb_gc_mark_node(NODE *obj);
|
|
483
499
|
|
|
500
|
+
struct rb_global_entry {
|
|
501
|
+
struct rb_global_variable *var;
|
|
502
|
+
ID id;
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
struct rb_global_entry *rb_global_entry(ID);
|
|
506
|
+
VALUE rb_gvar_get(struct rb_global_entry *);
|
|
507
|
+
VALUE rb_gvar_set(struct rb_global_entry *, VALUE);
|
|
508
|
+
VALUE rb_gvar_defined(struct rb_global_entry *);
|
|
484
509
|
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
|
485
510
|
|
|
486
511
|
struct rb_args_info {
|
|
@@ -506,7 +531,6 @@ void *rb_parser_malloc(struct parser_params *, size_t);
|
|
|
506
531
|
void *rb_parser_realloc(struct parser_params *, void *, size_t);
|
|
507
532
|
void *rb_parser_calloc(struct parser_params *, size_t, size_t);
|
|
508
533
|
void rb_parser_free(struct parser_params *, void *);
|
|
509
|
-
void rb_parser_printf(struct parser_params *parser, const char *fmt, ...);
|
|
510
534
|
|
|
511
535
|
RUBY_SYMBOL_EXPORT_END
|
|
512
536
|
|