Feature #10328 ยป 0001-make-OPT_SUPPORT_JOKE-a-proper-VM-option.patch
compile.c | ||
---|---|---|
551 | 551 |
ADD_INSN(ret, iseq->compile_data->last_line, leave); |
552 | 552 |
} |
553 | 553 | |
554 |
#if SUPPORT_JOKE |
|
554 |
#if OPT_SUPPORT_JOKE
|
|
555 | 555 |
if (iseq->compile_data->labels_table) { |
556 | 556 |
validate_labels(iseq, iseq->compile_data->labels_table); |
557 | 557 |
} |
... | ... | |
4286 | 4286 | |
4287 | 4287 |
INIT_ANCHOR(recv); |
4288 | 4288 |
INIT_ANCHOR(args); |
4289 |
#if SUPPORT_JOKE |
|
4289 |
#if OPT_SUPPORT_JOKE
|
|
4290 | 4290 |
if (nd_type(node) == NODE_VCALL) { |
4291 | 4291 |
ID id_bitblt; |
4292 | 4292 |
ID id_answer; |
eval.c | ||
---|---|---|
454 | 454 |
ID id_cause; |
455 | 455 |
CONST_ID(id_cause, "cause"); |
456 | 456 | |
457 |
#if SUPPORT_JOKE |
|
457 |
#if OPT_SUPPORT_JOKE
|
|
458 | 458 |
if (NIL_P(cause)) { |
459 | 459 |
ID id_true_cause; |
460 | 460 |
CONST_ID(id_true_cause, "true_cause"); |
iseq.h | ||
---|---|---|
121 | 121 |
int label_no; |
122 | 122 |
int node_level; |
123 | 123 |
const rb_compile_option_t *option; |
124 |
#if SUPPORT_JOKE |
|
124 |
#if OPT_SUPPORT_JOKE
|
|
125 | 125 |
st_table *labels_table; |
126 | 126 |
#endif |
127 | 127 |
}; |
tool/instruction.rb | ||
---|---|---|
216 | 216 |
def load_insns_def file |
217 | 217 |
body = insn = opes = pops = rets = nil |
218 | 218 |
comment = '' |
219 |
support_joke = vm_opt?('SUPPORT_JOKE') |
|
219 | 220 | |
220 | 221 |
vpath.open(file) {|f| |
221 | 222 |
f.instance_variable_set(:@line_no, 0) |
... | ... | |
269 | 270 |
# end instruction body |
270 | 271 |
when /^\}/ |
271 | 272 |
if insn_in |
272 |
body.instance_variable_set(:@line_no, line_no) |
|
273 |
body.instance_variable_set(:@file, f.path) |
|
274 |
insn = make_insn(insn, opes, pops, rets, comment, body, sp_inc) |
|
273 |
if comment[:c] != "joke" || support_joke |
|
274 |
body.instance_variable_set(:@line_no, line_no) |
|
275 |
body.instance_variable_set(:@file, f.path) |
|
276 |
insn = make_insn(insn, opes, pops, rets, comment, body, sp_inc) |
|
277 |
end |
|
275 | 278 |
insn_in = false |
276 | 279 |
comment = '' |
277 | 280 |
end |
vm_opts.h | ||
---|---|---|
47 | 47 |
#define OPT_STACK_CACHING 0 |
48 | 48 | |
49 | 49 |
/* misc */ |
50 |
#define SUPPORT_JOKE 0
|
|
50 |
#define OPT_SUPPORT_JOKE 0
|
|
51 | 51 | |
52 | 52 |
#ifndef VM_COLLECT_USAGE_DETAILS |
53 | 53 |
#define VM_COLLECT_USAGE_DETAILS 0 |
54 |
- |