Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
f093ed69
Commit
f093ed69
authored
Jun 14, 2012
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #282 from monaka/pr-remove-redundant-code
Remove some redundant code.
parents
c7b1622f
56103509
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1 addition
and
114 deletions
+1
-114
src/codegen.c
src/codegen.c
+0
-12
src/error.c
src/error.c
+0
-31
src/error.h
src/error.h
+0
-1
src/etc.c
src/etc.c
+0
-8
src/hash.c
src/hash.c
+0
-8
src/kernel.c
src/kernel.c
+0
-13
src/load.c
src/load.c
+0
-8
src/object.c
src/object.c
+0
-8
src/parse.y
src/parse.y
+0
-8
src/range.c
src/range.c
+0
-8
src/string.c
src/string.c
+1
-1
src/variable.c
src/variable.c
+0
-8
No files found.
src/codegen.c
View file @
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)
...
...
src/error.c
View file @
f093ed69
...
...
@@ -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 */
...
...
src/error.h
View file @
f093ed69
...
...
@@ -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
);
...
...
src/etc.c
View file @
f093ed69
...
...
@@ -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
)
{
...
...
src/hash.c
View file @
f093ed69
...
...
@@ -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
...
...
src/kernel.c
View file @
f093ed69
...
...
@@ -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
);
...
...
src/load.c
View file @
f093ed69
...
...
@@ -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
;
...
...
src/object.c
View file @
f093ed69
...
...
@@ -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
)
{
...
...
src/parse.y
View file @
f093ed69
...
...
@@ -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))
...
...
src/range.c
View file @
f093ed69
...
...
@@ -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
...
...
src/string.c
View file @
f093ed69
...
...
@@ -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
();
...
...
src/variable.c
View file @
f093ed69
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment