aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-10-04 01:48:31 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-10-04 02:30:36 +0900
commitb43afa0a8f82a5d806adc24afa2eaf41479da1a3 (patch)
treeb62d5698e738b2dcf16ecb7b91d7b7c7b1dae426 /internal.h
parent711c40ebdcd0974ef3e6ac6870412dc88ae25f3e (diff)
downloadruby-b43afa0a8f82a5d806adc24afa2eaf41479da1a3.tar.gz
Make parser_params have parent_iseq instead of base_block
The parser needs to determine whether a local varaiable is defined or not in outer scope. For the sake, "base_block" field has kept the outer block. However, the whole block was actually unneeded; the parser used only base_block->iseq. So, this change lets parser_params have the iseq directly, instead of the whole block.
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal.h b/internal.h
index 2346703d68..7d24e33bd1 100644
--- a/internal.h
+++ b/internal.h
@@ -1457,8 +1457,9 @@ VALUE rb_invcmp(VALUE, VALUE);
/* compile.c */
struct rb_block;
-int rb_dvar_defined(ID, const struct rb_block *);
-int rb_local_defined(ID, const struct rb_block *);
+struct rb_iseq_struct;
+int rb_dvar_defined(ID, const struct rb_iseq_struct *);
+int rb_local_defined(ID, const struct rb_iseq_struct *);
const char * rb_insns_name(int i);
VALUE rb_insns_name_array(void);
int rb_vm_insn_addr2insn(const void *);
@@ -1954,7 +1955,7 @@ struct RBasicRaw {
VALUE rb_parser_get_yydebug(VALUE);
VALUE rb_parser_set_yydebug(VALUE, VALUE);
RUBY_SYMBOL_EXPORT_BEGIN
-VALUE rb_parser_set_context(VALUE, const struct rb_block *, int);
+VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
RUBY_SYMBOL_EXPORT_END
void *rb_parser_load_file(VALUE parser, VALUE name);
int rb_is_const_name(VALUE name);