mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
iseq.c: remove unused rb_iseq_new_with_bopt
* iseq.c (prepare_iseq_build): remove unused block_opt param (rb_iseq_new_with_bopt_and_opt): remove (rb_iseq_new_with_opt): inline removed function (rb_iseq_new_with_bopt): remove (iseq_load): adjust prepare_iseq_build call [Feature #10565] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cbdac1eaf6
commit
d71c745b40
2 changed files with 19 additions and 26 deletions
|
@ -1,3 +1,12 @@
|
|||
Fri Dec 5 11:09:54 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* iseq.c (prepare_iseq_build): remove unused block_opt param
|
||||
(rb_iseq_new_with_bopt_and_opt): remove
|
||||
(rb_iseq_new_with_opt): inline removed function
|
||||
(rb_iseq_new_with_bopt): remove
|
||||
(iseq_load): adjust prepare_iseq_build call
|
||||
[Feature #10565]
|
||||
|
||||
Fri Dec 5 09:46:05 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (parser_yylex): fix lex_state after tLABEL_END, should
|
||||
|
|
36
iseq.c
36
iseq.c
|
@ -267,7 +267,7 @@ rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj)
|
|||
static VALUE
|
||||
prepare_iseq_build(rb_iseq_t *iseq,
|
||||
VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
|
||||
VALUE parent, enum iseq_type type, VALUE block_opt,
|
||||
VALUE parent, enum iseq_type type,
|
||||
const rb_compile_option_t *option)
|
||||
{
|
||||
iseq->type = type;
|
||||
|
@ -431,42 +431,26 @@ rb_iseq_new_main(NODE *node, VALUE path, VALUE absolute_path)
|
|||
parent, ISEQ_TYPE_MAIN, &COMPILE_OPTION_DEFAULT);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
rb_iseq_new_with_bopt_and_opt(NODE *node, VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
|
||||
VALUE parent, enum iseq_type type, VALUE bopt,
|
||||
const rb_compile_option_t *option)
|
||||
VALUE
|
||||
rb_iseq_new_with_opt(NODE *node, VALUE name, VALUE path, VALUE absolute_path,
|
||||
VALUE first_lineno, VALUE parent, enum iseq_type type,
|
||||
const rb_compile_option_t *option)
|
||||
{
|
||||
/* TODO: argument check */
|
||||
rb_iseq_t *iseq;
|
||||
VALUE self = iseq_alloc(rb_cISeq);
|
||||
|
||||
GetISeqPtr(self, iseq);
|
||||
iseq->self = self;
|
||||
|
||||
prepare_iseq_build(iseq, name, path, absolute_path, first_lineno, parent, type, bopt, option);
|
||||
prepare_iseq_build(iseq, name, path, absolute_path, first_lineno, parent,
|
||||
type, option);
|
||||
|
||||
rb_iseq_compile_node(self, node);
|
||||
cleanup_iseq_build(iseq);
|
||||
return self;
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_iseq_new_with_opt(NODE *node, VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
|
||||
VALUE parent, enum iseq_type type,
|
||||
const rb_compile_option_t *option)
|
||||
{
|
||||
/* TODO: argument check */
|
||||
return rb_iseq_new_with_bopt_and_opt(node, name, path, absolute_path, first_lineno, parent, type,
|
||||
Qfalse, option);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_iseq_new_with_bopt(NODE *node, VALUE name, VALUE path, VALUE absolute_path, VALUE first_lineno,
|
||||
VALUE parent, enum iseq_type type, VALUE bopt)
|
||||
{
|
||||
/* TODO: argument check */
|
||||
return rb_iseq_new_with_bopt_and_opt(node, name, path, absolute_path, first_lineno, parent, type,
|
||||
bopt, &COMPILE_OPTION_DEFAULT);
|
||||
}
|
||||
|
||||
#define CHECK_ARRAY(v) rb_convert_type((v), T_ARRAY, "Array", "to_ary")
|
||||
#define CHECK_HASH(v) rb_convert_type((v), T_HASH, "Hash", "to_hash")
|
||||
#define CHECK_STRING(v) rb_convert_type((v), T_STRING, "String", "to_str")
|
||||
|
@ -556,7 +540,7 @@ iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt)
|
|||
make_compile_option(&option, opt);
|
||||
|
||||
prepare_iseq_build(iseq, name, path, absolute_path, first_lineno,
|
||||
parent, (enum iseq_type)iseq_type, 0, &option);
|
||||
parent, (enum iseq_type)iseq_type, &option);
|
||||
|
||||
rb_iseq_build_from_ary(iseq, misc, locals, params, exception, body);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue