* eval_*.h: rename to eval_*.ci.
* common.mk: ditto. * eval_error.ci: remove ruby_set_current_source(). * error.c, eval.c, ruby.c: ditto. * eval_safe.c, proc.c: remove unused macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
144ff322c7
commit
6bd0345627
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
Mon Jun 25 04:20:14 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* eval_*.h: rename to eval_*.ci.
|
||||||
|
|
||||||
|
* common.mk: ditto.
|
||||||
|
|
||||||
|
* eval_error.ci: remove ruby_set_current_source().
|
||||||
|
|
||||||
|
* error.c, eval.c, ruby.c: ditto.
|
||||||
|
|
||||||
|
* eval_safe.c, proc.c: remove unused macros.
|
||||||
|
|
||||||
Mon Jun 25 03:37:20 2007 Koichi Sasada <ko1@atdot.net>
|
Mon Jun 25 03:37:20 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* insnhelper.ci (caller_setup_args): add need_block_check option.
|
* insnhelper.ci (caller_setup_args): add need_block_check option.
|
||||||
|
@ -407,8 +407,8 @@ error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}ruby.h {$(VPATH)}config.h \
|
|||||||
{$(VPATH)}thread_$(THREAD_MODEL).h
|
{$(VPATH)}thread_$(THREAD_MODEL).h
|
||||||
euc_jp.$(OBJEXT): {$(VPATH)}euc_jp.c {$(VPATH)}regenc.h \
|
euc_jp.$(OBJEXT): {$(VPATH)}euc_jp.c {$(VPATH)}regenc.h \
|
||||||
{$(VPATH)}oniguruma.h {$(VPATH)}config.h
|
{$(VPATH)}oniguruma.h {$(VPATH)}config.h
|
||||||
eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_error.h {$(VPATH)}eval_intern.h \
|
eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_error.ci {$(VPATH)}eval_intern.h \
|
||||||
{$(VPATH)}eval_method.h {$(VPATH)}eval_safe.h {$(VPATH)}eval_jump.h \
|
{$(VPATH)}eval_method.ci {$(VPATH)}eval_safe.ci {$(VPATH)}eval_jump.ci \
|
||||||
{$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}yarvcore.h \
|
{$(VPATH)}ruby.h {$(VPATH)}config.h {$(VPATH)}yarvcore.h \
|
||||||
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
{$(VPATH)}defines.h {$(VPATH)}intern.h {$(VPATH)}missing.h \
|
||||||
{$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}signal.h \
|
{$(VPATH)}node.h {$(VPATH)}util.h {$(VPATH)}signal.h \
|
||||||
|
1
error.c
1
error.c
@ -52,7 +52,6 @@ err_position(char *buf, long len)
|
|||||||
static int
|
static int
|
||||||
compile_position(char *buf, long len)
|
compile_position(char *buf, long len)
|
||||||
{
|
{
|
||||||
ruby_set_current_source();
|
|
||||||
return err_position_0(buf, len, ruby_sourcefile, ruby_sourceline);
|
return err_position_0(buf, len, ruby_sourcefile, ruby_sourceline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
eval.c
10
eval.c
@ -40,10 +40,10 @@ static VALUE eval(VALUE, VALUE, VALUE, char *, int);
|
|||||||
static inline VALUE rb_yield_0(int argc, VALUE *argv);
|
static inline VALUE rb_yield_0(int argc, VALUE *argv);
|
||||||
static VALUE rb_call(VALUE, VALUE, ID, int, const VALUE *, int);
|
static VALUE rb_call(VALUE, VALUE, ID, int, const VALUE *, int);
|
||||||
|
|
||||||
#include "eval_error.h"
|
#include "eval_error.ci"
|
||||||
#include "eval_method.h"
|
#include "eval_method.ci"
|
||||||
#include "eval_safe.h"
|
#include "eval_safe.ci"
|
||||||
#include "eval_jump.h"
|
#include "eval_jump.ci"
|
||||||
|
|
||||||
/* initialize ruby */
|
/* initialize ruby */
|
||||||
|
|
||||||
@ -691,7 +691,6 @@ rb_longjmp(int tag, VALUE mesg)
|
|||||||
mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
|
mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ruby_set_current_source();
|
|
||||||
if (ruby_sourcefile && !NIL_P(mesg)) {
|
if (ruby_sourcefile && !NIL_P(mesg)) {
|
||||||
at = get_backtrace(mesg);
|
at = get_backtrace(mesg);
|
||||||
if (NIL_P(at)) {
|
if (NIL_P(at)) {
|
||||||
@ -1708,7 +1707,6 @@ eval(VALUE self, VALUE src, VALUE scope, char *file, int line)
|
|||||||
NODE *stored_cref_stack = 0;
|
NODE *stored_cref_stack = 0;
|
||||||
|
|
||||||
if (file == 0) {
|
if (file == 0) {
|
||||||
ruby_set_current_source();
|
|
||||||
file = ruby_sourcefile;
|
file = ruby_sourcefile;
|
||||||
line = ruby_sourceline;
|
line = ruby_sourceline;
|
||||||
}
|
}
|
||||||
|
@ -2,17 +2,6 @@
|
|||||||
* included by eval.c
|
* included by eval.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SET_CURRENT_SOURCE() ((void)0)
|
|
||||||
|
|
||||||
void
|
|
||||||
ruby_set_current_source(void)
|
|
||||||
{
|
|
||||||
if (ruby_current_node) {
|
|
||||||
ruby_sourcefile = ruby_current_node->nd_file;
|
|
||||||
ruby_sourceline = nd_line(ruby_current_node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
warn_printf(const char *fmt, ...)
|
warn_printf(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
@ -31,7 +20,6 @@ warn_printf(const char *fmt, ...)
|
|||||||
static void
|
static void
|
||||||
error_pos(void)
|
error_pos(void)
|
||||||
{
|
{
|
||||||
ruby_set_current_source();
|
|
||||||
if (ruby_sourcefile) {
|
if (ruby_sourcefile) {
|
||||||
if (ruby_sourceline == 0) {
|
if (ruby_sourceline == 0) {
|
||||||
warn_printf("%s", ruby_sourcefile);
|
warn_printf("%s", ruby_sourcefile);
|
||||||
@ -84,7 +72,6 @@ error_print(void)
|
|||||||
if (EXEC_TAG())
|
if (EXEC_TAG())
|
||||||
goto error;
|
goto error;
|
||||||
if (NIL_P(errat)) {
|
if (NIL_P(errat)) {
|
||||||
ruby_set_current_source();
|
|
||||||
if (ruby_sourcefile)
|
if (ruby_sourcefile)
|
||||||
warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
|
warn_printf("%s:%d", ruby_sourcefile, ruby_sourceline);
|
||||||
else
|
else
|
@ -10,6 +10,8 @@
|
|||||||
4 - no global (non-tainted) variable modification/no direct output
|
4 - no global (non-tainted) variable modification/no direct output
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define SAFE_LEVEL_MAX 4
|
||||||
|
|
||||||
int
|
int
|
||||||
rb_safe_level(void)
|
rb_safe_level(void)
|
||||||
{
|
{
|
||||||
@ -22,16 +24,6 @@ rb_set_safe_level_force(int safe)
|
|||||||
GET_THREAD()->safe_level = safe;
|
GET_THREAD()->safe_level = safe;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE safe_getter _((void));
|
|
||||||
static void safe_setter _((VALUE val));
|
|
||||||
|
|
||||||
#define PROC_TSHIFT (FL_USHIFT+1)
|
|
||||||
#define PROC_TMASK (FL_USER1|FL_USER2|FL_USER3)
|
|
||||||
#define PROC_TMAX (PROC_TMASK >> PROC_TSHIFT)
|
|
||||||
#define PROC_NOSAFE FL_USER4
|
|
||||||
|
|
||||||
#define SAFE_LEVEL_MAX PROC_TMASK
|
|
||||||
|
|
||||||
/* $SAFE accessor */
|
/* $SAFE accessor */
|
||||||
void
|
void
|
||||||
rb_set_safe_level(int level)
|
rb_set_safe_level(int level)
|
7
proc.c
7
proc.c
@ -240,13 +240,6 @@ bind_eval(int argc, VALUE *argv, VALUE bindval)
|
|||||||
return rb_f_eval(argc+1, args, Qnil /* self will be searched in eval */);
|
return rb_f_eval(argc+1, args, Qnil /* self will be searched in eval */);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PROC_TSHIFT (FL_USHIFT+1)
|
|
||||||
#define PROC_TMASK (FL_USER1|FL_USER2|FL_USER3)
|
|
||||||
#define PROC_TMAX (PROC_TMASK >> PROC_TSHIFT)
|
|
||||||
#define PROC_NOSAFE FL_USER4
|
|
||||||
|
|
||||||
#define SAFE_LEVEL_MAX PROC_TMASK
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
proc_new(VALUE klass, int is_lambda)
|
proc_new(VALUE klass, int is_lambda)
|
||||||
{
|
{
|
||||||
|
2
ruby.c
2
ruby.c
@ -376,7 +376,6 @@ require_libraries(void)
|
|||||||
ruby_current_node = 0;
|
ruby_current_node = 0;
|
||||||
Init_ext(); /* should be called here for some reason :-( */
|
Init_ext(); /* should be called here for some reason :-( */
|
||||||
ruby_current_node = save[1];
|
ruby_current_node = save[1];
|
||||||
ruby_set_current_source();
|
|
||||||
req_list_last = 0;
|
req_list_last = 0;
|
||||||
while (list) {
|
while (list) {
|
||||||
int state;
|
int state;
|
||||||
@ -390,7 +389,6 @@ require_libraries(void)
|
|||||||
free(list);
|
free(list);
|
||||||
list = tmp;
|
list = tmp;
|
||||||
ruby_current_node = save[1];
|
ruby_current_node = save[1];
|
||||||
ruby_set_current_source();
|
|
||||||
}
|
}
|
||||||
req_list_head.next = 0;
|
req_list_head.next = 0;
|
||||||
ruby_eval_tree = save[0];
|
ruby_eval_tree = save[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user