зеркало из https://github.com/github/ruby.git
* include/ruby/mvm.h: new header file for MVM, and moved rb_vm_t and
rb_thread_t from vm_core.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7981720812
Коммит
1a192e2b29
|
@ -1,3 +1,8 @@
|
||||||
|
Sat May 31 15:17:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* include/ruby/mvm.h: new header file for MVM, and moved rb_vm_t and
|
||||||
|
rb_thread_t from vm_core.h.
|
||||||
|
|
||||||
Sat May 31 12:02:23 2008 Tanaka Akira <akr@fsij.org>
|
Sat May 31 12:02:23 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* test/ruby/envutil.rb (assert_normal_exit): show pid when fail.
|
* test/ruby/envutil.rb (assert_normal_exit): show pid when fail.
|
||||||
|
|
|
@ -1 +1,21 @@
|
||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
ruby/mvm.h -
|
||||||
|
|
||||||
|
$Author$
|
||||||
|
created at: Sun 10 12:06:15 Jun JST 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007-2008 Yukihiro Matsumoto
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef RUBY_H
|
||||||
|
#define RUBY_H 1
|
||||||
|
|
||||||
#include <ruby/ruby.h>
|
#include <ruby/ruby.h>
|
||||||
|
#if RUBY_VM
|
||||||
|
#include <ruby/mvm.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern void ruby_set_debug_option(const char *);
|
||||||
|
#endif /* RUBY_H */
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
ruby/mvm.h -
|
||||||
|
|
||||||
|
$Author$
|
||||||
|
created at: Sat May 31 15:17:36 2008
|
||||||
|
|
||||||
|
Copyright (C) 2008 Yukihiro Matsumoto
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef RUBY_MVM_H
|
||||||
|
#define RUBY_MVM_H 1
|
||||||
|
|
||||||
|
typedef struct rb_vm_struct rb_vm_t;
|
||||||
|
typedef struct rb_thread_struct rb_thread_t;
|
||||||
|
|
||||||
|
#endif /* RUBY_MVM_H */
|
3
main.c
3
main.c
|
@ -10,7 +10,7 @@
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#undef RUBY_EXPORT
|
#undef RUBY_EXPORT
|
||||||
#include "ruby/ruby.h"
|
#include "ruby.h"
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,7 +21,6 @@ int
|
||||||
main(int argc, char **argv, char **envp)
|
main(int argc, char **argv, char **envp)
|
||||||
{
|
{
|
||||||
#ifdef RUBY_DEBUG_ENV
|
#ifdef RUBY_DEBUG_ENV
|
||||||
extern void ruby_set_debug_option(const char *);
|
|
||||||
ruby_set_debug_option(getenv("RUBY_DEBUG"));
|
ruby_set_debug_option(getenv("RUBY_DEBUG"));
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
#include "ruby/ruby.h"
|
#include "ruby/ruby.h"
|
||||||
|
#include "ruby/mvm.h"
|
||||||
#include "ruby/signal.h"
|
#include "ruby/signal.h"
|
||||||
#include "ruby/st.h"
|
#include "ruby/st.h"
|
||||||
#include "ruby/node.h"
|
#include "ruby/node.h"
|
||||||
|
@ -285,7 +286,8 @@ typedef struct rb_iseq_struct rb_iseq_t;
|
||||||
#define GetVMPtr(obj, ptr) \
|
#define GetVMPtr(obj, ptr) \
|
||||||
GetCoreDataFromValue(obj, rb_vm_t, ptr)
|
GetCoreDataFromValue(obj, rb_vm_t, ptr)
|
||||||
|
|
||||||
typedef struct rb_vm_struct {
|
struct rb_vm_struct
|
||||||
|
{
|
||||||
VALUE self;
|
VALUE self;
|
||||||
|
|
||||||
rb_thread_lock_t global_interpreter_lock;
|
rb_thread_lock_t global_interpreter_lock;
|
||||||
|
@ -320,7 +322,7 @@ typedef struct rb_vm_struct {
|
||||||
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
|
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
|
||||||
struct rb_objspace *objspace;
|
struct rb_objspace *objspace;
|
||||||
#endif
|
#endif
|
||||||
} rb_vm_t;
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
VALUE *pc; /* cfp[0] */
|
VALUE *pc; /* cfp[0] */
|
||||||
|
@ -378,8 +380,6 @@ struct rb_unblock_callback {
|
||||||
void *arg;
|
void *arg;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct rb_thread_struct rb_thread_t;
|
|
||||||
|
|
||||||
struct rb_thread_struct
|
struct rb_thread_struct
|
||||||
{
|
{
|
||||||
VALUE self;
|
VALUE self;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче