mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
appending compile error without rb_errinfo
* compile.c (append_compile_error, compile_bug): pass iseq and get error info and file from it, not by the thread error info. * error.c (rb_report_bug_valist): take va_list instead of variadic arguments, and just report the bug but not abort. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
64231b49ca
commit
51612505f7
4 changed files with 70 additions and 42 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Apr 19 13:46:19 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* compile.c (append_compile_error, compile_bug): pass iseq and get
|
||||||
|
error info and file from it, not by the thread error info.
|
||||||
|
|
||||||
|
* error.c (rb_report_bug_valist): take va_list instead of variadic
|
||||||
|
arguments, and just report the bug but not abort.
|
||||||
|
|
||||||
Tue Apr 19 13:18:12 2016 Naotoshi Seo <sonots@gmail.com>
|
Tue Apr 19 13:18:12 2016 Naotoshi Seo <sonots@gmail.com>
|
||||||
|
|
||||||
* lib/time.rb: revert r54167 because it would break
|
* lib/time.rb: revert r54167 because it would break
|
||||||
|
|
83
compile.c
83
compile.c
|
@ -312,13 +312,14 @@ r_value(VALUE value)
|
||||||
(((INSN*)(insn))->insn_id)
|
(((INSN*)(insn))->insn_id)
|
||||||
|
|
||||||
/* error */
|
/* error */
|
||||||
typedef void (*compile_error_func)(VALUE, int, const char *, ...);
|
typedef void (*compile_error_func)(rb_iseq_t *, int, const char *, ...);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
append_compile_error(VALUE file, int line, const char *fmt, ...)
|
append_compile_error(rb_iseq_t *iseq, int line, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
VALUE err_info = rb_errinfo();
|
VALUE err_info = ISEQ_COMPILE_DATA(iseq)->err_info;
|
||||||
VALUE str = rb_attr_get(err_info, idMesg);
|
VALUE str = rb_attr_get(err_info, idMesg);
|
||||||
|
VALUE file = iseq->body->location.path;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
if (RSTRING_LEN(str)) rb_str_cat2(str, "\n");
|
if (RSTRING_LEN(str)) rb_str_cat2(str, "\n");
|
||||||
|
@ -332,13 +333,23 @@ append_compile_error(VALUE file, int line, const char *fmt, ...)
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
compile_bug(rb_iseq_t *iseq, int line, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
rb_report_bug_valist(iseq->body->location.path, line, fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
NOINLINE(static compile_error_func prepare_compile_error(rb_iseq_t *iseq));
|
NOINLINE(static compile_error_func prepare_compile_error(rb_iseq_t *iseq));
|
||||||
|
|
||||||
static compile_error_func
|
static compile_error_func
|
||||||
prepare_compile_error(rb_iseq_t *iseq)
|
prepare_compile_error(rb_iseq_t *iseq)
|
||||||
{
|
{
|
||||||
VALUE err_info = ISEQ_COMPILE_DATA(iseq)->err_info;
|
VALUE err_info = ISEQ_COMPILE_DATA(iseq)->err_info;
|
||||||
if (compile_debug) return &rb_compile_bug_str;
|
if (compile_debug) return &compile_bug;
|
||||||
if (NIL_P(err_info)) {
|
if (NIL_P(err_info)) {
|
||||||
err_info = rb_exc_new_cstr(rb_eSyntaxError, "");
|
err_info = rb_exc_new_cstr(rb_eSyntaxError, "");
|
||||||
RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, err_info);
|
RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, err_info);
|
||||||
|
@ -349,7 +360,7 @@ prepare_compile_error(rb_iseq_t *iseq)
|
||||||
|
|
||||||
#define COMPILE_ERROR prepare_compile_error(iseq)
|
#define COMPILE_ERROR prepare_compile_error(iseq)
|
||||||
|
|
||||||
#define ERROR_ARGS_AT(n) ruby_sourcefile_string, nd_line(n),
|
#define ERROR_ARGS_AT(n) iseq, nd_line(n),
|
||||||
#define ERROR_ARGS ERROR_ARGS_AT(node)
|
#define ERROR_ARGS ERROR_ARGS_AT(node)
|
||||||
|
|
||||||
#define EXPECT_NODE(prefix, node, ndtype) \
|
#define EXPECT_NODE(prefix, node, ndtype) \
|
||||||
|
@ -357,23 +368,23 @@ do { \
|
||||||
NODE *error_node = (node); \
|
NODE *error_node = (node); \
|
||||||
enum node_type error_type = nd_type(error_node); \
|
enum node_type error_type = nd_type(error_node); \
|
||||||
if (error_type != (ndtype)) { \
|
if (error_type != (ndtype)) { \
|
||||||
rb_compile_bug_str(ERROR_ARGS_AT(error_node) \
|
compile_bug(ERROR_ARGS_AT(error_node) \
|
||||||
prefix ": " #ndtype " is expected, but %s", \
|
prefix ": " #ndtype " is expected, but %s", \
|
||||||
ruby_node_name(error_type)); \
|
ruby_node_name(error_type)); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define EXPECT_NODE_NONULL(prefix, parent, ndtype) \
|
#define EXPECT_NODE_NONULL(prefix, parent, ndtype) \
|
||||||
do { \
|
do { \
|
||||||
rb_compile_bug_str(ERROR_ARGS_AT(parent) \
|
compile_bug(ERROR_ARGS_AT(parent) \
|
||||||
prefix ": must be " #ndtype ", but 0"); \
|
prefix ": must be " #ndtype ", but 0"); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define UNKNOWN_NODE(prefix, node) \
|
#define UNKNOWN_NODE(prefix, node) \
|
||||||
do { \
|
do { \
|
||||||
NODE *error_node = (node); \
|
NODE *error_node = (node); \
|
||||||
rb_compile_bug_str(ERROR_ARGS_AT(error_node) prefix ": unknown node (%s)", \
|
compile_bug(ERROR_ARGS_AT(error_node) prefix ": unknown node (%s)", \
|
||||||
ruby_node_name(nd_type(error_node))); \
|
ruby_node_name(nd_type(error_node))); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define COMPILE_OK 1
|
#define COMPILE_OK 1
|
||||||
|
@ -511,7 +522,6 @@ iseq_add_mark_object(const rb_iseq_t *iseq, VALUE v)
|
||||||
return COMPILE_OK;
|
return COMPILE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ruby_sourcefile_string (iseq->body->location.path)
|
|
||||||
#define ruby_sourcefile RSTRING_PTR(iseq->body->location.path)
|
#define ruby_sourcefile RSTRING_PTR(iseq->body->location.path)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -530,7 +540,7 @@ validate_label(st_data_t name, st_data_t label, st_data_t arg)
|
||||||
LABEL *lobj = (LABEL *)label;
|
LABEL *lobj = (LABEL *)label;
|
||||||
if (!lobj->link.next) {
|
if (!lobj->link.next) {
|
||||||
do {
|
do {
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, lobj->position,
|
COMPILE_ERROR(iseq, lobj->position,
|
||||||
"%"PRIsVALUE": undefined label",
|
"%"PRIsVALUE": undefined label",
|
||||||
rb_id2str((ID)name));
|
rb_id2str((ID)name));
|
||||||
} while (0);
|
} while (0);
|
||||||
|
@ -632,7 +642,7 @@ rb_iseq_compile_node(rb_iseq_t *iseq, NODE *node)
|
||||||
COMPILE(ret, "defined guard", node);
|
COMPILE(ret, "defined guard", node);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rb_compile_bug_str(ERROR_ARGS "unknown scope");
|
compile_bug(ERROR_ARGS "unknown scope");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1585,7 +1595,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
||||||
default:
|
default:
|
||||||
dump_disasm_list(FIRST_ELEMENT(anchor));
|
dump_disasm_list(FIRST_ELEMENT(anchor));
|
||||||
dump_disasm_list(list);
|
dump_disasm_list(list);
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, line, "error: set_sequence");
|
COMPILE_ERROR(iseq, line, "error: set_sequence");
|
||||||
return COMPILE_NG;
|
return COMPILE_NG;
|
||||||
}
|
}
|
||||||
list = list->next;
|
list = list->next;
|
||||||
|
@ -1632,7 +1642,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
||||||
dump_disasm_list(list);
|
dump_disasm_list(list);
|
||||||
xfree(generated_iseq);
|
xfree(generated_iseq);
|
||||||
xfree(line_info_table);
|
xfree(line_info_table);
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
|
COMPILE_ERROR(iseq, iobj->line_no,
|
||||||
"operand size miss! (%d for %d)",
|
"operand size miss! (%d for %d)",
|
||||||
iobj->operand_size, len - 1);
|
iobj->operand_size, len - 1);
|
||||||
return COMPILE_NG;
|
return COMPILE_NG;
|
||||||
|
@ -1647,7 +1657,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
||||||
/* label(destination position) */
|
/* label(destination position) */
|
||||||
LABEL *lobj = (LABEL *)operands[j];
|
LABEL *lobj = (LABEL *)operands[j];
|
||||||
if (!lobj->set) {
|
if (!lobj->set) {
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
|
COMPILE_ERROR(iseq, iobj->line_no,
|
||||||
"unknown label");
|
"unknown label");
|
||||||
return COMPILE_NG;
|
return COMPILE_NG;
|
||||||
}
|
}
|
||||||
|
@ -1742,7 +1752,7 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
||||||
default:
|
default:
|
||||||
xfree(generated_iseq);
|
xfree(generated_iseq);
|
||||||
xfree(line_info_table);
|
xfree(line_info_table);
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
|
COMPILE_ERROR(iseq, iobj->line_no,
|
||||||
"unknown operand type: %c", type);
|
"unknown operand type: %c", type);
|
||||||
return COMPILE_NG;
|
return COMPILE_NG;
|
||||||
}
|
}
|
||||||
|
@ -1799,8 +1809,9 @@ iseq_set_sequence(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
||||||
generated_iseq[code_index++] = BIN(nop);
|
generated_iseq[code_index++] = BIN(nop);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rb_compile_bug_str(ruby_sourcefile_string, adjust->line_no,
|
compile_bug(iseq, adjust->line_no,
|
||||||
"iseq_set_sequence: adjust bug %d < %d", orig_sp, sp);
|
"iseq_set_sequence: adjust bug %d < %d",
|
||||||
|
orig_sp, sp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2543,7 +2554,7 @@ insn_set_sc_state(rb_iseq_t *iseq, INSN *iobj, int state)
|
||||||
dump_disasm_list((LINK_ELEMENT *)iobj);
|
dump_disasm_list((LINK_ELEMENT *)iobj);
|
||||||
dump_disasm_list((LINK_ELEMENT *)lobj);
|
dump_disasm_list((LINK_ELEMENT *)lobj);
|
||||||
printf("\n-- %d, %d\n", lobj->sc_state, nstate);
|
printf("\n-- %d, %d\n", lobj->sc_state, nstate);
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
|
COMPILE_ERROR(iseq, iobj->line_no,
|
||||||
"insn_set_sc_state error\n");
|
"insn_set_sc_state error\n");
|
||||||
return COMPILE_NG;
|
return COMPILE_NG;
|
||||||
}
|
}
|
||||||
|
@ -2645,7 +2656,7 @@ iseq_set_sequence_stackcaching(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
|
||||||
case SCS_XX:
|
case SCS_XX:
|
||||||
goto normal_insn;
|
goto normal_insn;
|
||||||
default:
|
default:
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, iobj->line_no,
|
COMPILE_ERROR(iseq, iobj->line_no,
|
||||||
"unreachable");
|
"unreachable");
|
||||||
return COMPILE_NG;
|
return COMPILE_NG;
|
||||||
}
|
}
|
||||||
|
@ -2689,8 +2700,8 @@ compile_dstr_fragments(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE *node, int *cntp)
|
||||||
if (!NIL_P(lit)) {
|
if (!NIL_P(lit)) {
|
||||||
cnt++;
|
cnt++;
|
||||||
if (!RB_TYPE_P(lit, T_STRING)) {
|
if (!RB_TYPE_P(lit, T_STRING)) {
|
||||||
rb_compile_bug_str(ERROR_ARGS "dstr: must be string: %s",
|
compile_bug(ERROR_ARGS "dstr: must be string: %s",
|
||||||
rb_builtin_type_name(TYPE(lit)));
|
rb_builtin_type_name(TYPE(lit)));
|
||||||
}
|
}
|
||||||
lit = node->nd_lit = rb_fstring(lit);
|
lit = node->nd_lit = rb_fstring(lit);
|
||||||
ADD_INSN1(ret, nd_line(node), putobject, lit);
|
ADD_INSN1(ret, nd_line(node), putobject, lit);
|
||||||
|
@ -3979,7 +3990,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
|
|
||||||
vals = node->nd_head;
|
vals = node->nd_head;
|
||||||
if (!vals) {
|
if (!vals) {
|
||||||
rb_compile_bug_str(ERROR_ARGS "NODE_WHEN: must be NODE_ARRAY, but 0");
|
compile_bug(ERROR_ARGS "NODE_WHEN: must be NODE_ARRAY, but 0");
|
||||||
}
|
}
|
||||||
switch (nd_type(vals)) {
|
switch (nd_type(vals)) {
|
||||||
case NODE_ARRAY:
|
case NODE_ARRAY:
|
||||||
|
@ -4073,7 +4084,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
|
|
||||||
if (node->nd_state == Qundef) {
|
if (node->nd_state == Qundef) {
|
||||||
/* ADD_INSN(ret, line, putundef); */
|
/* ADD_INSN(ret, line, putundef); */
|
||||||
rb_compile_bug_str(ERROR_ARGS "unsupported: putundef");
|
compile_bug(ERROR_ARGS "unsupported: putundef");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ADD_INSN(ret, line, putnil);
|
ADD_INSN(ret, line, putnil);
|
||||||
|
@ -4549,7 +4560,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
|
idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
|
||||||
|
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
rb_compile_bug_str(ERROR_ARGS "NODE_DASGN(_CURR): unknown id (%"PRIsVALUE")", rb_id2str(node->nd_vid));
|
compile_bug(ERROR_ARGS "NODE_DASGN(_CURR): unknown id (%"PRIsVALUE")",
|
||||||
|
rb_id2str(node->nd_vid));
|
||||||
}
|
}
|
||||||
|
|
||||||
ADD_INSN2(ret, line, setlocal, INT2FIX(ls - idx), INT2FIX(lv));
|
ADD_INSN2(ret, line, setlocal, INT2FIX(ls - idx), INT2FIX(lv));
|
||||||
|
@ -5273,8 +5285,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
rb_compile_bug_str(ERROR_ARGS_AT(node->nd_head) "can't make hash with this node: %s",
|
compile_bug(ERROR_ARGS_AT(node->nd_head) "can't make hash with this node: %s",
|
||||||
ruby_node_name(type));
|
ruby_node_name(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (poped) {
|
if (poped) {
|
||||||
|
@ -5364,7 +5376,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
if (!poped) {
|
if (!poped) {
|
||||||
idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
|
idx = get_dyna_var_idx(iseq, node->nd_vid, &lv, &ls);
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
rb_compile_bug_str(ERROR_ARGS "unknown dvar (%"PRIsVALUE")", rb_id2str(node->nd_vid));
|
compile_bug(ERROR_ARGS "unknown dvar (%"PRIsVALUE")",
|
||||||
|
rb_id2str(node->nd_vid));
|
||||||
}
|
}
|
||||||
ADD_INSN2(ret, line, getlocal, INT2FIX(ls - idx), INT2FIX(lv));
|
ADD_INSN2(ret, line, getlocal, INT2FIX(ls - idx), INT2FIX(lv));
|
||||||
}
|
}
|
||||||
|
@ -5962,13 +5975,13 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
|
||||||
|
|
||||||
if (default_value == (NODE *)-1) {
|
if (default_value == (NODE *)-1) {
|
||||||
/* required argument. do nothing */
|
/* required argument. do nothing */
|
||||||
rb_compile_bug_str(ERROR_ARGS "unreachable");
|
compile_bug(ERROR_ARGS "unreachable");
|
||||||
}
|
}
|
||||||
else if (nd_type(default_value) == NODE_LIT ||
|
else if (nd_type(default_value) == NODE_LIT ||
|
||||||
nd_type(default_value) == NODE_NIL ||
|
nd_type(default_value) == NODE_NIL ||
|
||||||
nd_type(default_value) == NODE_TRUE ||
|
nd_type(default_value) == NODE_TRUE ||
|
||||||
nd_type(default_value) == NODE_FALSE) {
|
nd_type(default_value) == NODE_FALSE) {
|
||||||
rb_compile_bug_str(ERROR_ARGS "unreachable");
|
compile_bug(ERROR_ARGS "unreachable");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* if keywordcheck(_kw_bits, nth_keyword)
|
/* if keywordcheck(_kw_bits, nth_keyword)
|
||||||
|
@ -6509,14 +6522,14 @@ iseq_build_from_ary_body(rb_iseq_t *iseq, LINK_ANCHOR *anchor,
|
||||||
insn = (argc < 0) ? Qnil : RARRAY_AREF(obj, 0);
|
insn = (argc < 0) ? Qnil : RARRAY_AREF(obj, 0);
|
||||||
if (st_lookup(insn_table, (st_data_t)insn, &insn_id) == 0) {
|
if (st_lookup(insn_table, (st_data_t)insn, &insn_id) == 0) {
|
||||||
/* TODO: exception */
|
/* TODO: exception */
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, line_no,
|
COMPILE_ERROR(iseq, line_no,
|
||||||
"unknown instruction: %+"PRIsVALUE, insn);
|
"unknown instruction: %+"PRIsVALUE, insn);
|
||||||
ret = COMPILE_NG;
|
ret = COMPILE_NG;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc != insn_len((VALUE)insn_id)-1) {
|
if (argc != insn_len((VALUE)insn_id)-1) {
|
||||||
COMPILE_ERROR(ruby_sourcefile_string, line_no,
|
COMPILE_ERROR(iseq, line_no,
|
||||||
"operand size mismatch");
|
"operand size mismatch");
|
||||||
ret = COMPILE_NG;
|
ret = COMPILE_NG;
|
||||||
break;
|
break;
|
||||||
|
|
19
error.c
19
error.c
|
@ -308,7 +308,7 @@ bug_report_file(const char *file, int line)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
bug_report_begin(FILE *out, const char *fmt, va_list args)
|
bug_report_begin_valist(FILE *out, const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
char buf[REPORT_BUG_BUFSIZ];
|
char buf[REPORT_BUG_BUFSIZ];
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ bug_report_begin(FILE *out, const char *fmt, va_list args)
|
||||||
#define bug_report_begin(out, fmt) do { \
|
#define bug_report_begin(out, fmt) do { \
|
||||||
va_list args; \
|
va_list args; \
|
||||||
va_start(args, fmt); \
|
va_start(args, fmt); \
|
||||||
bug_report_begin(out, fmt, args); \
|
bug_report_begin_valist(out, fmt, args); \
|
||||||
va_end(args); \
|
va_end(args); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -349,6 +349,15 @@ bug_report_end(FILE *out)
|
||||||
} \
|
} \
|
||||||
} while (0) \
|
} while (0) \
|
||||||
|
|
||||||
|
#define report_bug_valist(file, line, fmt, ctx, args) do { \
|
||||||
|
FILE *out = bug_report_file(file, line); \
|
||||||
|
if (out) { \
|
||||||
|
bug_report_begin_valist(out, fmt, args); \
|
||||||
|
rb_vm_bugreport(ctx); \
|
||||||
|
bug_report_end(out); \
|
||||||
|
} \
|
||||||
|
} while (0) \
|
||||||
|
|
||||||
NORETURN(static void die(void));
|
NORETURN(static void die(void));
|
||||||
static void
|
static void
|
||||||
die(void)
|
die(void)
|
||||||
|
@ -437,11 +446,9 @@ rb_async_bug_errno(const char *mesg, int errno_arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
rb_compile_bug_str(VALUE file, int line, const char *fmt, ...)
|
rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
report_bug(RSTRING_PTR(file), line, fmt, NULL);
|
report_bug_valist(RSTRING_PTR(file), line, fmt, NULL, args);
|
||||||
|
|
||||||
abort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -850,7 +850,7 @@ VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
|
||||||
extern VALUE rb_eEAGAIN;
|
extern VALUE rb_eEAGAIN;
|
||||||
extern VALUE rb_eEWOULDBLOCK;
|
extern VALUE rb_eEWOULDBLOCK;
|
||||||
extern VALUE rb_eEINPROGRESS;
|
extern VALUE rb_eEINPROGRESS;
|
||||||
NORETURN(PRINTF_ARGS(void rb_compile_bug_str(VALUE file, int line, const char *fmt, ...), 3, 4));
|
void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
|
||||||
PRINTF_ARGS(void rb_compile_error_str(VALUE file, int line, void *enc, const char *fmt, ...), 4, 5);
|
PRINTF_ARGS(void rb_compile_error_str(VALUE file, int line, void *enc, const char *fmt, ...), 4, 5);
|
||||||
VALUE rb_check_backtrace(VALUE);
|
VALUE rb_check_backtrace(VALUE);
|
||||||
NORETURN(void rb_async_bug_errno(const char *,int));
|
NORETURN(void rb_async_bug_errno(const char *,int));
|
||||||
|
|
Loading…
Add table
Reference in a new issue