Commit Graph

4227 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto e29efb02bd normalize NaN after division that may generate NaN; fix #1712 2014-02-15 19:59:26 +09:00
Yukihiro "Matz" Matsumoto 8b93f8591d Merge pull request #1709 from cubicdaiya/issues/nonvoid
Give the type 'void' to functions have no argument.
2014-02-15 13:25:41 +09:00
cubicdaiya 3d716f2376 Give the type 'void' to functions have no argument.
According to the C standard,
it is desirable to give the type 'void'
to functions have no argument.
2014-02-14 19:47:15 +09:00
Yukihiro "Matz" Matsumoto 7586d474b5 Merge pull request #1707 from Fleurer/issue1706
keep stack with nlocals instead of nregs; fix #1706
2014-02-14 17:06:43 +09:00
Yukihiro "Matz" Matsumoto 007ed07e77 Merge pull request #1708 from Fleurer/cleanup-warning-hash-dup
cleanup warnings in hash.c
2014-02-14 17:04:21 +09:00
Li Yazhou 7ab0506795 add test for Hash#dup 2014-02-14 13:26:19 +08:00
Li Yazhou adbf1eba99 clearn up warning in hash.c
/home/fleuria/code/mruby/src/hash.c:159:1: warning: ‘mrb_hash_dp`defined but not used [-Wunused-function]
 mrb_hash_dup(mrb_state *mrb, mrb_value hash)
     ^

this commit defines Hash#dup to take advantage of mrb_hash_dup, however
it seems that Hash#dup is not in ISO standard.
2014-02-14 13:22:30 +08:00
Li Yazhou 876e7de7ec add a regression test for #1706 2014-02-14 11:32:59 +08:00
Li Yazhou 9ebfeac111 keep stack with nlocals instead of nregs; fix #1706 2014-02-14 11:16:56 +08:00
Yukihiro "Matz" Matsumoto ba8a8e75c7 Merge pull request #1702 from cremno/hash-hash-ext-changes
hash / hash-ext: various small changes
2014-02-14 01:29:19 +09:00
Yukihiro "Matz" Matsumoto 69eaaa146c Merge pull request #1705 from takahashim/version-number
MRUBY_VERSION should be only numbers separated by dot, like JRUBY_VERSION or Rubinius::VERSION
2014-02-14 01:27:05 +09:00
Yukihiro "Matz" Matsumoto 9ad55617c3 Merge pull request #1703 from cremno/parenthesize-mrbdump-errnos
dump.h: parenthesize negative errnos
2014-02-14 01:26:13 +09:00
Yukihiro "Matz" Matsumoto bc8c803990 Merge pull request #1704 from cremno/rm-mrb_str_literal-decl
remove mrb_str_literal declaration
2014-02-14 01:25:54 +09:00
Yukihiro "Matz" Matsumoto 22d5102504 Merge pull request #1701 from cremno/do-not-use-mrb_str_cat2
mrb_str_cat2: deprecated since 0cedf8f
2014-02-14 01:25:17 +09:00
takahashim ac4443879a MRUBY_VERSION should be only numbers separated by dot, like JRUBY_VERSION or Rubinius::VERSION 2014-02-13 22:19:42 +09:00
cremno 8bbc2c107b mrb_str_cat2: deprecated since 0cedf8f 2014-02-13 13:45:28 +01:00
cremno 5a76288f3f remove mrb_str_literal declaration
definition was removed in 677a2ac
2014-02-13 13:39:44 +01:00
cremno e8945b8598 dump.h: parenthesize negative errnos 2014-02-13 13:39:22 +01:00
cremno 4ffea85b62 hash / hash-ext: various small changes
src/hash.c:
 - mrb_hash_(aget|aset|dup|delete): internal linkage
 - remove documentation of methods which are not implemented (in here)
 - remove #assoc; unused, not in ISO spec
 - remove #rassoc: same, implementation is also wrong

hash-ext mrbgem:
 - remove header "mruby/khash.h"
 - remove mrb_hash_values_at (move code into hash_values_at, i: long -> int)
 - less whitespace in gem_init function
2014-02-13 13:39:09 +01:00
Yukihiro "Matz" Matsumoto 7a32c7b183 remove direct inclusion of mruby/version.h from version.c; #1698 2014-02-13 00:45:56 +09:00
Tomoyuki Sahara 50ef284015 include mruby/version.h in mruby.h 2014-02-12 10:26:19 +09:00
Yukihiro "Matz" Matsumoto 26781692b7 Merge pull request #1697 from cremno/array-changes
array implementation: several small changes
2014-02-12 09:31:28 +09:00
Yukihiro "Matz" Matsumoto 4558b29719 Merge pull request #1694 from cremno/rakefile-mkdir-bin-path
Rakefile: make bin directory
2014-02-12 09:28:50 +09:00
Yukihiro "Matz" Matsumoto 67d63387ee Merge pull request #1695 from cremno/clang-and-icl-define-direct-threaded
Clang and ICC/ICL: define DIRECT_THREADED
2014-02-12 09:28:12 +09:00
Yukihiro "Matz" Matsumoto 8e78db3af3 Merge pull request #1693 from cremno/mruby-math-rm-cygwin-compat
mruby-math: remove Cygwin compatibility macros
2014-02-12 09:27:41 +09:00
cremno 7691b64963 array implementation: several small changes
src/array.c:
 - make various functions without declaration in the mruby headers static
 - removed all uncessary int casts and two useless comments
 mrb_ary_new_from_values: move to similar functions
 mrb_check_array_type: fix indentation

include/mruby/array.h:
 mrb_shared_array: padding (default "mrbconf.h" on an usual 64-bit system)
                   sizeof(mrb_int)==sizeof(int)==4 && sizeof(mrb_value*)==8

both:
 mrb_ary_aget:  remove declaration in header and make static
                nobody uses it which is not surprising since it has 1 req arg!
 mrb_assoc_new: small optimization and move to similar functions
 mrb_ary_len:   re-implement as static inline function (it is used by mrbgems)
                programmers should directly use RARRAY_LEN instead
2014-02-12 00:37:47 +01:00
cremno d1f474c239 Rakefile: make bin directory 2014-02-12 00:04:42 +01:00
cremno b7899aa6ee mruby-math: remove Cygwin compatibility macros
nan:
 The first non-test release of Cygwin 1.5.x was over a decade ago:
 <http://cygwin.com/ml/cygwin-announce/2003-09/msg00001.html>

log/log10:
 This workaround is not needed anymore (1.2.6.1, 1.3 - both over 6 years ago):
 <https://sourceware.org/cgi-bin/cvsweb.cgi/src/newlib/libm/math/w_log.c?cvsroot=src>
2014-02-12 00:03:12 +01:00
cremno 8a3a3a5a49 Clang and ICC/ICL: define DIRECT_THREADED
This is most likely only needed on Windows be-
cause __GNUC__ is not defined by both compilers.

It might fail with some unusual configurations.
If that is the case, feel free to open an issue.
2014-02-11 23:55:52 +01:00
Yukihiro "Matz" Matsumoto 27dbcd0f0d add RUBY_ENGINE; ref #576 2014-02-11 15:37:03 +09:00
Yukihiro "Matz" Matsumoto d7960bf2a9 resolve conflict in travis_config.rb 2014-02-10 09:50:32 +09:00
Yukihiro "Matz" Matsumoto 5519bd69bc Merge pull request #1692 from Paxa/Kernel_global_variables
Fix Kernel#global_variables for $1-$9
2014-02-10 09:34:53 +09:00
Pavel 411168deab Fix Kernel#global_variables for $1-$9 2014-02-09 23:54:49 +07:00
Yukihiro "Matz" Matsumoto 00bdaec766 initialize ci->stackent at the top; #1691 2014-02-09 19:20:16 +09:00
Yukihiro "Matz" Matsumoto ee0b7d150b Merge branch 'original2' of https://github.com/miura1729/mruby into miura1729-original2 2014-02-09 18:37:20 +09:00
Yukihiro "Matz" Matsumoto 19a08b8455 Merge pull request #1674 from cremno/mrb_bool-FALSE-TRUE
use mrb_bool, FALSE and TRUE more
2014-02-09 18:35:20 +09:00
Miura Hideki 5df82e357c Store raw stack address in callinfo instead of offset from stbas 2014-02-09 16:42:25 +09:00
Yukihiro "Matz" Matsumoto d8a5f12053 forget to add function prototypes 2014-02-08 13:56:15 +09:00
Yukihiro "Matz" Matsumoto b35893ee13 Merge pull request #1689 from Bovi-Li/remove-notice
Remove *very early version* notice
2014-02-08 13:53:41 +09:00
Yukihiro "Matz" Matsumoto 0947aefa23 Merge pull request #1690 from bovi/patch-2
Add download link for stable version to README
2014-02-08 13:53:20 +09:00
Yukihiro "Matz" Matsumoto 4a2c37df93 made mrb_define_class to return existing class, with heavy refactoring 2014-02-08 13:44:31 +09:00
Yukihiro "Matz" Matsumoto 5da7bd3a91 rename mrb_name_class and make it static 2014-02-08 10:20:23 +09:00
Daniel Bovensiepen cd5677ea72 Add download link for stable version to README
- add download link of stable version 1.0.0
- remove remark for mruby branch due to non-existence
2014-02-08 03:26:22 +08:00
Daniel Bovensiepen 5056a29d93 Remove notice of early version 2014-02-08 03:06:05 +08:00
Yukihiro "Matz" Matsumoto 56b5356f6b add MRUBY_RELEASE info in numbers 2014-02-07 16:57:17 +09:00
Yukihiro "Matz" Matsumoto 95e2be6508 forgot to add new files 2014-02-07 12:24:24 +09:00
Yukihiro "Matz" Matsumoto 3ff9aad22f move version info from gems to core; ref #576 #1684 2014-02-07 12:18:55 +09:00
Yukihiro "Matz" Matsumoto c3f02afa21 Merge pull request #1688 from cubicdaiya/issues/unnecessary_semicolon
Remove unnecessary semicolon
2014-02-06 21:16:24 +09:00
cubicdaiya 360d92dc28 remove unnecessary semicolon 2014-02-06 19:05:45 +09:00
Yukihiro "Matz" Matsumoto 7ba4612956 use mrb_str_new_lit() more widely 2014-02-06 08:54:47 +09:00