~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to eval_intern.h

  • Committer: Bazaar Package Importer
  • Author(s): akira yamada
  • Date: 2007-06-06 11:58:24 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070606115824-qzldkdwq3dvfpf84
Tags: 1.9.0+20070606-1
* new upstream snapshot. (2006-06-06)
* updated debian/generated-incs/* files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
 
118
118
#include <sys/stat.h>
119
119
 
 
120
#define SAVE_ROOT_JMPBUF(th, stmt) do \
 
121
  if (ruby_setjmp((th)->root_jmpbuf) == 0) { \
 
122
      stmt; \
 
123
  } \
 
124
  else { \
 
125
      rb_fiber_start(); \
 
126
  } while (0)
 
127
 
120
128
#define TH_PUSH_TAG(th) do { \
121
129
  rb_thread_t * const _th = th; \
122
130
  struct rb_vm_tag _tag; \
185
193
VALUE rb_f_eval(int argc, VALUE *argv, VALUE self);
186
194
VALUE rb_make_exception _((int argc, VALUE *argv));
187
195
 
 
196
NORETURN(void rb_fiber_start(void));
 
197
 
188
198
NORETURN(void rb_raise_jump _((VALUE)));
189
199
NORETURN(void print_undef _((VALUE, ID)));
190
200
NORETURN(void th_localjump_error(const char *, VALUE, int));
195
205
NODE *th_get_cref(rb_thread_t *th, rb_iseq_t *iseq, rb_control_frame_t *cfp);
196
206
NODE *th_cref_push(rb_thread_t *th, VALUE, int);
197
207
NODE *th_set_special_cref(rb_thread_t *th, VALUE *lfp, NODE * cref_stack);
 
208
VALUE th_make_jump_tag_but_local_jump(int state, VALUE val);
198
209
 
199
210
static rb_control_frame_t *
200
211
th_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp)
201
212
{
202
 
    rb_iseq_t *iseq = 0;
203
213
    while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp)) {
204
214
        if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
205
 
            iseq = cfp->iseq;
206
 
            break;
 
215
            return cfp;
207
216
        }
208
217
        cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
209
218
    }
210
 
    if (!iseq) {
211
 
        return 0;
212
 
    }
213
 
    return cfp;
 
219
    return 0;
214
220
}
215
221
 
216
222
static inline NODE *