Commit 93cabfc1 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

Merge branch 'master' of github.com:mruby/mruby

parents 040b57fa f093ed69
...@@ -298,20 +298,8 @@ push_(codegen_scope *s) ...@@ -298,20 +298,8 @@ push_(codegen_scope *s)
s->sp++; s->sp++;
nregs_update; nregs_update;
} }
#if 0
static void
push_n_(codegen_scope *s, int n)
{
if (s->sp + n > 511) {
codegen_error(s, "too complex expression");
}
s->sp += n;
nregs_update;
}
#endif
#define push() push_(s) #define push() push_(s)
#define push_n(n) push_n_(s, n)
#define pop() (s->sp--) #define pop() (s->sp--)
#define pop_n(n) (s->sp-=(n)) #define pop_n(n) (s->sp-=(n))
#define cursp() (s->sp) #define cursp() (s->sp)
......
...@@ -20,14 +20,6 @@ ...@@ -20,14 +20,6 @@
#define warn_printf printf #define warn_printf printf
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
mrb_value mrb_value
mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, long len) mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, long len)
{ {
...@@ -300,28 +292,6 @@ sysexit_status(mrb_state *mrb, mrb_value err) ...@@ -300,28 +292,6 @@ sysexit_status(mrb_state *mrb, mrb_value err)
return mrb_fixnum(st); return mrb_fixnum(st);
} }
void
error_pos(void)
{
#if 0
const char *sourcefile = mrb_sourcefile();
int sourceline = mrb_sourceline();
if (sourcefile) {
if (sourceline == 0) {
warn_printf("%s", sourcefile);
}
else if (mrb_frame_callee()) {
warn_printf("%s:%d:in `%s'", sourcefile, sourceline,
mrb_sym2name(mrb, mrb_frame_callee()));
}
else {
warn_printf("%s:%d", sourcefile, sourceline);
}
}
#endif
}
static void static void
set_backtrace(mrb_state *mrb, mrb_value info, mrb_value bt) set_backtrace(mrb_state *mrb, mrb_value info, mrb_value bt)
{ {
...@@ -428,7 +398,6 @@ mrb_init_exception(mrb_state *mrb) ...@@ -428,7 +398,6 @@ mrb_init_exception(mrb_state *mrb)
// eScriptError = mrb_define_class(mrb, "ScriptError", mrb->eException_class); /* 15.2.37 */ // eScriptError = mrb_define_class(mrb, "ScriptError", mrb->eException_class); /* 15.2.37 */
// mrb_define_class(mrb, "SyntaxError", eScriptError); /* 15.2.38 */ // mrb_define_class(mrb, "SyntaxError", eScriptError); /* 15.2.38 */
// mrb_define_class(mrb, "LoadError", eScriptError); /* 15.2.39 */ // mrb_define_class(mrb, "LoadError", eScriptError); /* 15.2.39 */
// mrb_define_class(mrb, "NotImplementedError", eScriptError_class);
// mrb_define_class(mrb, "SystemCallError", mrb->eStandardError_class); /* 15.2.36 */ // mrb_define_class(mrb, "SystemCallError", mrb->eStandardError_class); /* 15.2.36 */
mrb_define_class(mrb, "LocalJumpError", mrb->eStandardError_class); /* 15.2.25 */ mrb_define_class(mrb, "LocalJumpError", mrb->eStandardError_class); /* 15.2.25 */
......
...@@ -14,7 +14,6 @@ struct RException { ...@@ -14,7 +14,6 @@ struct RException {
void mrb_sys_fail(mrb_state *mrb, const char *mesg); void mrb_sys_fail(mrb_state *mrb, const char *mesg);
void mrb_bug_errno(const char*, int); void mrb_bug_errno(const char*, int);
int sysexit_status(mrb_state *mrb, mrb_value err); int sysexit_status(mrb_state *mrb, mrb_value err);
void error_pos(void);
mrb_value mrb_exc_new3(mrb_state *mrb, struct RClass* c, mrb_value str); mrb_value mrb_exc_new3(mrb_state *mrb, struct RClass* c, mrb_value str);
mrb_value make_exception(mrb_state *mrb, int argc, mrb_value *argv, int isstr); mrb_value make_exception(mrb_state *mrb, int argc, mrb_value *argv, int isstr);
mrb_value mrb_make_exception(mrb_state *mrb, int argc, mrb_value *argv); mrb_value mrb_make_exception(mrb_state *mrb, int argc, mrb_value *argv);
......
...@@ -10,14 +10,6 @@ ...@@ -10,14 +10,6 @@
#include "mruby/numeric.h" #include "mruby/numeric.h"
#include "mruby/data.h" #include "mruby/data.h"
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
struct RData* struct RData*
mrb_data_object_alloc(mrb_state *mrb, struct RClass *klass, void *ptr, const struct mrb_data_type *type) mrb_data_object_alloc(mrb_state *mrb, struct RClass *klass, void *ptr, const struct mrb_data_type *type)
{ {
......
...@@ -33,14 +33,6 @@ mrb_hash_ht_hash_equal(mrb_state *mrb, mrb_value a, mrb_value b) ...@@ -33,14 +33,6 @@ mrb_hash_ht_hash_equal(mrb_state *mrb, mrb_value a, mrb_value b)
KHASH_INIT(ht, mrb_value, mrb_value, 1, mrb_hash_ht_hash_func, mrb_hash_ht_hash_equal); KHASH_INIT(ht, mrb_value, mrb_value, 1, mrb_hash_ht_hash_func, mrb_hash_ht_hash_equal);
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
static void mrb_hash_modify(mrb_state *mrb, mrb_value hash); static void mrb_hash_modify(mrb_state *mrb, mrb_value hash);
static inline mrb_value static inline mrb_value
......
...@@ -34,22 +34,9 @@ typedef enum { ...@@ -34,22 +34,9 @@ typedef enum {
NOEX_RESPONDS = 0x80 NOEX_RESPONDS = 0x80
} mrb_method_flag_t; } mrb_method_flag_t;
#ifdef INCLUDE_REGEXP
#include "re.h"
#include "regint.h"
#endif
KHASH_INIT(mt, mrb_sym, struct RProc*, 1, kh_int_hash_func, kh_int_hash_equal) KHASH_INIT(mt, mrb_sym, struct RProc*, 1, kh_int_hash_func, kh_int_hash_equal)
KHASH_INIT(iv, mrb_sym, mrb_value, 1, kh_int_hash_func, kh_int_hash_equal) KHASH_INIT(iv, mrb_sym, mrb_value, 1, kh_int_hash_func, kh_int_hash_equal)
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
struct obj_ivar_tag { struct obj_ivar_tag {
mrb_value obj; mrb_value obj;
int (*func)(mrb_sym key, mrb_value val, void * arg); int (*func)(mrb_sym key, mrb_value val, void * arg);
......
...@@ -13,14 +13,6 @@ ...@@ -13,14 +13,6 @@
#endif #endif
#include "mruby/irep.h" #include "mruby/irep.h"
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
typedef struct _RiteFILE typedef struct _RiteFILE
{ {
FILE* fp; FILE* fp;
......
...@@ -11,14 +11,6 @@ ...@@ -11,14 +11,6 @@
#include "mruby/class.h" #include "mruby/class.h"
#include "mruby/numeric.h" #include "mruby/numeric.h"
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
int int
mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2) mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2)
{ {
......
...@@ -41,14 +41,6 @@ static void backref_error(parser_state *p, node *n); ...@@ -41,14 +41,6 @@ static void backref_error(parser_state *p, node *n);
#define identchar(c) (isalnum(c) || (c) == '_' || !isascii(c)) #define identchar(c) (isalnum(c) || (c) == '_' || !isascii(c))
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
typedef unsigned int stack_type; typedef unsigned int stack_type;
#define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1)) #define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1))
......
...@@ -15,14 +15,6 @@ ...@@ -15,14 +15,6 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef OTHER #ifndef OTHER
#define OTHER 2 #define OTHER 2
#endif #endif
......
...@@ -763,7 +763,7 @@ num_index: ...@@ -763,7 +763,7 @@ num_index:
len = RSTRING_LEN(str); len = RSTRING_LEN(str);
switch (mrb_range_beg_len(mrb, indx, &beg, &len, len, 0)) { switch (mrb_range_beg_len(mrb, indx, &beg, &len, len, 0)) {
case 0/*FLASE*/: case FALSE:
break; break;
case 2/*OTHER*/: case 2/*OTHER*/:
return mrb_nil_value(); return mrb_nil_value();
......
...@@ -21,14 +21,6 @@ ...@@ -21,14 +21,6 @@
KHASH_INIT(iv, mrb_sym, mrb_value, 1, kh_int_hash_func, kh_int_hash_equal) KHASH_INIT(iv, mrb_sym, mrb_value, 1, kh_int_hash_func, kh_int_hash_equal)
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
static void static void
mark_tbl(mrb_state *mrb, struct kh_iv *h) mark_tbl(mrb_state *mrb, struct kh_iv *h)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment