Commit Graph

60 Commits

Author SHA1 Message Date
Yukihiro Matsumoto 1ed39d5c05 use TRUE/FALSE instead of 1/0 2012-08-13 04:19:24 +09:00
Yukihiro Matsumoto 4debf651a3 optimize assignment just before OP_RETURN 2012-08-10 05:15:58 +09:00
Yukihiro Matsumoto 7c4bd7fffd remove OP_MOVE just before OP_RETURN 2012-08-05 17:07:43 +09:00
Yukihiro Matsumoto b8b22c1d17 use mrb_obj_equal to check pool 2012-08-02 22:15:49 +09:00
Yukihiro Matsumoto a7f0e3bc80 small return optimization: use R0 to set return value if possible 2012-08-02 13:13:41 +09:00
Yukihiro Matsumoto 91318da3bc wrong return value from empty block/lambda 2012-08-02 12:57:57 +09:00
Yukihiro Matsumoto dcfff971ff remove OP_LOADNIL from NODE_OP_ASGN 2012-08-02 00:48:50 +09:00
Yukihiro Matsumoto 0220953efe no OP_LOADNIL for operators (OP_ADD, etc) 2012-08-01 02:33:55 +09:00
Yukihiro Matsumoto cde3c35666 too much peephole optimization 2012-08-01 01:11:16 +09:00
Yukihiro Matsumoto 1563cdfcce float do not have enough precision to represent Fixnum if MRB_USE_FLOAT is set 2012-08-01 00:06:50 +09:00
Yukihiro Matsumoto e87c95eba7 codegen optimization based on http://d.hatena.ne.jp/mirichi/20120730/p1 [Japanese]. 2012-07-31 22:21:42 +09:00
Max Anselm 5a4beeed2d Make all(?) void casts explicit for C++ 2012-07-29 19:48:48 -04:00
Yukihiro Matsumoto 7f8076ef90 more peephole optimization on OP_MOVE 2012-07-28 11:23:29 +09:00
Yukihiro Matsumoto b60baedae5 replace strcpy by memcpy; close #383 2012-07-19 08:23:49 +09:00
Yukihiro Matsumoto 49cac5f97d case should care about return value; close #372 2012-07-16 11:54:35 +09:00
Junji Sawada 96366117ea Remove unnecessary header inclusion 2012-07-14 11:39:25 +09:00
Yukihiro Matsumoto 737eaea038 allow DISABLE/ENABLE_SATDIO 2012-07-13 15:00:45 +09:00
Yukihiro Matsumoto bbec03bb7a add missing (empty) default for swtch; close #364 2012-07-13 14:35:18 +09:00
Yukihiro Matsumoto fbd5305c1b remove comma from OP_ERR 2012-07-13 10:11:11 +09:00
Yukihiro Matsumoto ca930538ea prepare for OP_TAILCALL 2012-07-05 01:40:23 +09:00
Yukihiro Matsumoto ee32521f90 add input check to readint_float() 2012-07-04 17:14:59 +09:00
Yukihiro Matsumoto 472847adc2 input cast to unsigned char for unqualified tolower(); close #342 2012-07-04 17:12:47 +09:00
Yukihiro Matsumoto 4a98d5c8fd allow string interpolation in symbols like :"a=#{15}" 2012-06-28 23:35:17 +09:00
Masaki Muranaka d534f26f16 Use sizeof to get char array sizes. 2012-06-27 10:36:39 +09:00
Yukihiro Matsumoto f045e64675 reduce calling mrb_str_new_cstr() to avoid strlen(); #301 2012-06-23 13:51:50 +09:00
Yukihiro Matsumoto 9936ce997c forgot to rename function mrb_sym2name -> mrb_sym2name_len 2012-06-21 16:27:05 +09:00
Yukihiro Matsumoto a70c4e0c79 reduce calling of strlen(); #301 2012-06-21 16:22:29 +09:00
Masaki Muranaka aa1bbe67b6 Simplify. Should not use strlen() as possible. It needs complexity. 2012-06-21 11:17:16 +09:00
Yukihiro Matsumoto 4aa9111f9a escape codedump strings/symbols 2012-06-15 14:45:03 +09:00
Masaki Muranaka f564ec7e82 Remove some redundant code. 2012-06-15 00:56:00 +09:00
Yukihiro Matsumoto 3fb20bc72a BLKPUSH (and super) need to detect surrounding method scope (not block) 2012-06-14 03:45:28 +09:00
Yukihiro Matsumoto 30b1904859 need to adjust register pos after rescue 2012-06-14 03:26:36 +09:00
Yukihiro Matsumoto f1ec5f5d50 use MKOP_sBx for OP_JMP 2012-06-14 03:11:21 +09:00
Yukihiro Matsumoto 6919ca61ed stop using strtol (via readint) except in load.c; use custom readint_float 2012-06-13 23:16:53 +09:00
Yukihiro Matsumoto 8004168725 readint() returns long 2012-06-13 19:16:24 +09:00
Yukihiro Matsumoto 261e4d3fa0 handle number literal overflow 2012-06-13 17:48:03 +09:00
Yukihiro Matsumoto 3894177233 generate optimized OP_DIV instruction 2012-06-13 15:37:11 +09:00
Yukihiro Matsumoto c5536326a1 replace * and == by optimization instructions OP_MUL and OP_EQ respectively; close #264 2012-06-12 23:47:23 +09:00
Yukihiro Matsumoto 3403f19cb5 should handle splat in super arguments 2012-06-12 12:14:59 +09:00
Yukihiro Matsumoto 13a542d48d zsuper should respect block given; close #185 2012-06-11 15:55:04 +09:00
Yukihiro Matsumoto f24a52b04a remove mrb_open NULL check for small test programs. They are only for proof-on-concept test, not production code. Adding precise checks are not needed for those code 2012-06-04 01:46:04 +09:00
Jon 2fff59dc86 Check mrb_open return value for NULL 2012-06-03 11:11:35 -04:00
Kazuki Tsujimoto 0629cf21ba A rescue clause with no parameter list rescues only StandardErrors 2012-06-03 17:48:02 +09:00
Masaki Muranaka 703e97d5b3 Use "if" instead "switch". 2012-06-02 08:43:04 +09:00
Yukihiro Matsumoto a0b30fc01f OP_RETURN operand should be stack position of the new scope, not the current scope 2012-06-01 23:56:17 +09:00
Yukihiro Matsumoto d19cdfd2b1 allow ||= and &&= 2012-05-31 15:54:09 +09:00
Yukihiro Matsumoto f6d539eabd clear arena_idx after exiting scope; close #195 2012-05-26 11:18:16 +09:00
Yukihiro Matsumoto c2a084dff9 wrong number of arguments for self-assignments 2012-05-24 09:24:11 +09:00
Mitchell Blank Jr d1cd10421f change example code to do mrb_close()
I was hoping this would cause valgrind to complain less, but there is still
a lot of memory leaked (does mrb_close() actually free all of the managed
blocks?)  Anyway this helps somewhat and is good practice
2012-05-22 01:03:54 -07:00
Mitchell Blank Jr 3471e2b134 C++ compilability - don't define types inside others
The following is legal code in both C and C++:

  struct foo {
    struct bar { int a } x;
    int y;
  };

...however in C++ it defines a type called "foo::bar" instead of "bar".
Just avoid this construct altogether
2012-05-19 22:40:57 -07:00