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)
s->sp++;
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_n(n) push_n_(s, n)
#define pop() (s->sp--)
#define pop_n(n) (s->sp-=(n))
#define cursp() (s->sp)
......
......@@ -20,14 +20,6 @@
#define warn_printf printf
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
mrb_value
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)
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
set_backtrace(mrb_state *mrb, mrb_value info, mrb_value bt)
{
......@@ -428,7 +398,6 @@ mrb_init_exception(mrb_state *mrb)
// 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, "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, "LocalJumpError", mrb->eStandardError_class); /* 15.2.25 */
......
......@@ -14,7 +14,6 @@ struct RException {
void mrb_sys_fail(mrb_state *mrb, const char *mesg);
void mrb_bug_errno(const char*, int);
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 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);
......
......@@ -10,14 +10,6 @@
#include "mruby/numeric.h"
#include "mruby/data.h"
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
struct RData*
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)
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 inline mrb_value
......
......@@ -34,22 +34,9 @@ typedef enum {
NOEX_RESPONDS = 0x80
} 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(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 {
mrb_value obj;
int (*func)(mrb_sym key, mrb_value val, void * arg);
......
......@@ -13,14 +13,6 @@
#endif
#include "mruby/irep.h"
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
typedef struct _RiteFILE
{
FILE* fp;
......
......@@ -11,14 +11,6 @@
#include "mruby/class.h"
#include "mruby/numeric.h"
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
int
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);
#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;
#define BITSTACK_PUSH(stack, n) ((stack) = ((stack)<<1)|((n)&1))
......
......@@ -15,14 +15,6 @@
#include <stdio.h>
#include <string.h>
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef OTHER
#define OTHER 2
#endif
......
......@@ -763,7 +763,7 @@ num_index:
len = RSTRING_LEN(str);
switch (mrb_range_beg_len(mrb, indx, &beg, &len, len, 0)) {
case 0/*FLASE*/:
case FALSE:
break;
case 2/*OTHER*/:
return mrb_nil_value();
......
......@@ -21,14 +21,6 @@
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
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