Commit Graph

922 Commits

Author SHA1 Message Date
Yukihiro Matsumoto 8cf42709d1 constant access should refer outer class/module; close #514 2012-11-01 04:21:39 +09:00
Yukihiro "Matz" Matsumoto b720156c99 Merge pull request #515 from iij/pr-fix-mrb-format
fixes *.mrb dump/load format with escaped character.
2012-10-29 23:30:59 -07:00
Yukihiro "Matz" Matsumoto 4c700eddb7 Merge pull request #517 from skandhas/pr-fix-cannot-get-const-form-singleton-class
fix cannot get/set const variable form singleton class
2012-10-29 23:29:29 -07:00
skandhas ec343a6421 fix cannot get/set const variable form singleton class 2012-10-30 14:00:58 +08:00
Masaki Muranaka 30f7a93d41 Use NULL instead of 0. (It is not a bug fix but a cosmetic change.) 2012-10-30 14:25:00 +09:00
Akira Yumiyama 94d16805a5 fixes *.mrb dump/load format with escaped character.
- hex-style string support
 - mrb format changes like:
  - "\n" (before: \n -> after: \n)
  - '\n' (before: \n -> after: \\n)
2012-10-30 08:30:18 +09:00
Yukihiro "Matz" Matsumoto 4d1a8718bd Merge pull request #513 from monaka/pr-not-use-memset-in-structure-initialization3
Use substitution instead of memset in structure initialization.
2012-10-28 22:47:08 -07:00
Masaki Muranaka f3090c3000 Use substitution instead of memset in structure initialization. 2012-10-29 11:29:57 +09:00
Yukihiro Matsumoto cfc1269d33 revert part of #507 for warning 2012-10-29 03:29:32 +09:00
Yukihiro "Matz" Matsumoto c6c4da8c48 Merge pull request #510 from masuidrive/master
define convert method mrb_int/mrb_float with C string
2012-10-28 10:45:43 -07:00
Yukihiro "Matz" Matsumoto d7d5c15b54 Merge pull request #511 from iij/pr-no-method-error-mesg
change the error message (NoMethodError, NameError)
2012-10-28 10:43:57 -07:00
Yukihiro "Matz" Matsumoto 69e2d27245 Merge pull request #507 from monaka/pr-not-use-memset-in-structure-initialization
Use substitution instead of memset in structure initializations.
2012-10-28 10:43:31 -07:00
Akira Yumiyama e407022b10 change the error message (NoMethodError, NameError) 2012-10-28 20:20:13 +09:00
Yuichiro MASUI 15f46a1feb define convert method mrb_int/mrb_float with C string 2012-10-27 14:26:50 +09:00
Yukihiro Matsumoto 559933f577 singleton classes should be able to have instance variables; close #509 2012-10-26 20:46:02 +09:00
Masaki Muranaka 1933e2660c Use substitution instead of memset in structure initialization. 2012-10-25 15:47:45 +09:00
Yukihiro "Matz" Matsumoto f5b6f03c9e Merge pull request #505 from monaka/pr-add-unformat-mrb_raise
Change C API for raise.
2012-10-22 22:20:24 -07:00
Yukihiro Matsumoto 18fbe4d0b7 do not touch h from Hash when h might be NULL 2012-10-23 14:16:14 +09:00
Yukihiro Matsumoto 32f9cdc97d adjust regsiter stack for NODE_OP_ASGN that use OP_SEND 2012-10-23 14:15:29 +09:00
Yukihiro Matsumoto 09376f9b2a skip useless OP_MOVE in peephole optimization 2012-10-23 14:14:26 +09:00
Yukihiro Matsumoto 413528ce80 adjust regsiter stack for NODE_OP_ASGN; close #499 2012-10-23 11:35:26 +09:00
Masaki Muranaka 6069a33089 mrb_raisef(): new function. Same as previou version of mrb_raise().
mrb_raise(): API modified. It cannot treat variable arguments.
2012-10-23 09:42:22 +09:00
Yukihiro "Matz" Matsumoto e05bbd45bb Merge pull request #504 from monaka/pr-remove-redundant-sizeof-char
Remove redundant sizeof(char).
2012-10-22 07:09:46 -07:00
Yukihiro "Matz" Matsumoto b8c94be107 Merge pull request #503 from monaka/pr-fix-protype-declaration-mismatch-in-uint8_dump
Fix prototype/declaration mismatch in uint8_dump().
2012-10-22 07:09:03 -07:00
Masaki Muranaka dd10048094 Remove redundant sizeof(char). "Always sizeof(char) == 1" is described in ISO C specs. 2012-10-22 11:21:04 +09:00
Masaki Muranaka fed285d194 Use MRB_DUMP_SIZE_OF_CHAR instead of sizeof(char). 2012-10-22 11:17:31 +09:00
Masaki Muranaka 2ab40b4dcc Fix prototype/declaration mismatch in uint8_dump(). 2012-10-22 11:08:06 +09:00
Masaki Muranaka 2cb183f183 Avoid memcpy() on copying structures. 2012-10-22 10:36:49 +09:00
Yukihiro "Matz" Matsumoto 0debca9bdf Merge pull request #500 from monaka/pr-avoid-memcpy-on-copying-structure
Avoid memcpy() on copying structures.
2012-10-21 16:42:56 -07:00
Masaki Muranaka d5c4439013 Avoid memcpy() on copying structures. 2012-10-21 00:49:39 +09:00
Yukihiro Matsumoto 7fe6d00ff5 avoid duplicated OP_RETURN 2012-10-20 09:48:04 +09:00
Yukihiro Matsumoto 750b7c209c pop register stack before rescue 2012-10-20 08:44:25 +09:00
Yukihiro Matsumoto 89a18e4f22 unexpect break/next/redo/retry should raise LocalJumpError 2012-10-20 03:59:13 +09:00
Yukihiro Matsumoto 9bb6f0b331 pool string need not to convert 2012-10-20 03:32:02 +09:00
Yukihiro Matsumoto da637cac4a should handle break in rescue 2012-10-20 03:30:58 +09:00
Yukihiro Matsumoto 400a9d8101 shuld handle return in rescue; close #497 2012-10-19 23:18:57 +09:00
Yukihiro Matsumoto 651e8b7e9c empty NODE_BEGIN should push nil; close #496 2012-10-19 23:04:20 +09:00
Yukihiro "Matz" Matsumoto eaf26aa57e Merge pull request #495 from iij/pr-hexstr-load-broken
Fix wrong storage of data when hex-style string is loaded
2012-10-19 05:31:58 -07:00
Yukihiro Matsumoto ac3b1c4c5a lshift must not assume sizeof(long) >= sizeof(mrb_int) 2012-10-19 01:50:40 +09:00
Takashi Sogabe c2a6ff7af8 Fix wrong storage of data when hex-style string is loaded
This patch fixes corruption of data when hex-style string is
loaded.

I saw following phenomenon in an ubuntu/amd64 environment.

Test code:
str = "\x0\x1\x2\x03\x04\x05\x06\a\b\t\n\v\f\r\x0E\x0F\x10"
p str[-1] == "\0x10"

Output(binary program with mrbc -B):
false

Output(script with mruby):
true
2012-10-18 17:35:56 +09:00
Yukihiro Matsumoto ace6fe76e4 Merge branch 'master' of github.com:mruby/mruby 2012-10-17 22:26:18 +09:00
Yukihiro "Matz" Matsumoto 73e9c78bc4 Merge pull request #493 from iij/pr-return-breaks-sp
Fix disappearance of a local variable when return statement is called
2012-10-17 06:25:59 -07:00
Masaki Muranaka e84dfd4337 Fix degrades by #490. (Some changes are reverted.) 2012-10-17 21:32:50 +09:00
Takashi Sogabe 8d6f1b04a1 Fix disappearance of a local variable when return statement is called
Commit of #18dd60c causes disappearance of a local variable
if return statement is called without arguments.

This patch fixes incorrect value of stack pointer.

test program:
def test_return_cond
  return if nil
  obj = 123
  p obj
  p obj.class
end
test_return_cond

output(commit #18dd60c):
main
Object

output(includes this patch):
123
Fixnum
2012-10-17 12:55:50 +09:00
Yukihiro Matsumoto 8d977981b7 no memory copy for call_iseq 2012-10-17 05:59:29 +09:00
Yukihiro Matsumoto 70abbb423a should not free() static iseq from cdump 2012-10-17 02:57:40 +09:00
Yukihiro Matsumoto 18dd60c162 remove wasting stack space 2012-10-16 23:47:16 +09:00
Yukihiro Matsumoto 8271863fe5 Kernel#block_given? always gave false 2012-10-16 23:46:34 +09:00
Yukihiro Matsumoto 27f002496f true/false should print proper inspect string 2012-10-16 22:33:34 +09:00
Yukihiro Matsumoto f2da76b6ef register number adjustment for case statement was wrong; close #487 2012-10-16 22:24:40 +09:00