Commit Graph

6478 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 5fa01f4ca3 Merge pull request #2789 from take-cheeze/PR2760_piece
Use `mrb_funcall` instead of `mrb_load_string` in test driver.
2015-05-17 20:43:32 +09:00
Yukihiro "Matz" Matsumoto cf070b64f1 Merge pull request #2792 from cremno/let-the-c-compiler-validate-the-identifier
let the C compiler validate the identifier
2015-05-17 20:42:41 +09:00
Yukihiro "Matz" Matsumoto 0cae5eaf94 Merge pull request #2791 from cremno/remove-mrb_define_method_vm
remove mrb_define_method_vm() function
2015-05-17 20:41:27 +09:00
Yukihiro "Matz" Matsumoto 579ba2d9e4 Merge pull request #2790 from bovi/copyright-2015
Update Coopyright Information to year 2015
2015-05-17 19:59:51 +09:00
cremno 406fb9c809 let the C compiler validate the identifier
Some C compilers may allow other characters in identifiers such as $.
They may also implement C99's extended identifiers (\u30EB\u30D3\u30FC,
ルビー).
2015-05-15 22:41:46 +02:00
cremno 2106d4d446 remove mrb_define_method_vm() function
It isn't needed as it's very similar to mrb_define_method_raw() and also
there's only one place where mrb_proc_ptr() actually has to be called.

Inspired by @furunkel's method cache patch (#2764).
2015-05-15 13:04:55 +02:00
Daniel Bovensiepen 02fffb02d2 Update Coopyright Information to year 2015 2015-05-15 15:12:32 +08:00
take_cheeze ab565f16bc Use mrb_funcall instead of mrb_load_string in test driver.
Related to #2760.
2015-05-15 16:06:03 +09:00
Yukihiro "Matz" Matsumoto bc8308ba8d Merge pull request #2788 from sgnr/dump-without-stdio
Reenable mrb_dump_irep under DISABLE_STDIO.
2015-05-15 09:47:40 +09:00
Simon Génier 1e51517615 Reenable mrb_dump_irep under DISABLE_STDIO. 2015-05-14 15:43:29 -04:00
Yukihiro "Matz" Matsumoto dd3a292a27 Merge pull request #2787 from cremno/remove-unused-token-declarations
remove unused token declarations
2015-05-14 18:52:05 +09:00
cremno 7fe853c216 remove unused token declarations 2015-05-13 18:31:51 +02:00
Yukihiro "Matz" Matsumoto 91ba9ba77b Merge pull request #2786 from furunkel/set_value
Avoid unnecessary stores and reloads
2015-05-13 18:20:02 +09:00
furunkel 99a00cf417 Avoid unnecessary stores and reloads 2015-05-12 13:46:56 +02:00
Yukihiro "Matz" Matsumoto 0628778306 Merge pull request #2785 from bovi/install-doc
Remove INSTALL and improve README instead
2015-05-12 20:00:20 +09:00
Daniel Bovensiepen 691997a447 Remove INSTALL and improve README instead 2015-05-12 18:32:20 +08:00
Yukihiro "Matz" Matsumoto d979172b3e Merge pull request #2784 from cremno/fix-splat-without-assignment
fix splat without assignment
2015-05-08 11:49:49 +09:00
cremno 2aa59393ba fix splat without assignment; fix #2781
The parser generates NODE_NIL for tSTAR without argument in masgns. The
codegen didn't handle that.
2015-05-07 16:58:43 +02:00
Yukihiro "Matz" Matsumoto 4bafd62844 Merge pull request #2782 from cremno/define-yydebug-macro-conditionally
define YYDEBUG macro conditionally
2015-05-07 23:43:09 +09:00
Yukihiro "Matz" Matsumoto d9e37bd729 Merge pull request #2783 from pbosetti/master
Defining static version of frexpl also fro MIPS platforms.
2015-05-07 23:41:46 +09:00
Paolo Bosetti 5e5e129014 Defining static version of frexpl also fro MIPS platforms.
On MIPS/linaro, libm.so lacks frexpl() as CygWin does.
2015-05-07 13:05:25 +02:00
cremno 3cd80a520a define YYDEBUG macro conditionally
The YYDEBUG macro enables parser debugging which
unnecessarily increases the executable size (9 to 10 KB).
Now it only will be defined when PARSER_DEBUG is too.
2015-05-04 16:53:50 +02:00
Yukihiro "Matz" Matsumoto 2fe556d9c0 push cmdarg_stack in lambda body; fix [ruby-bug#11107] 2015-04-30 15:21:01 +09:00
Yukihiro "Matz" Matsumoto b09f1712af Merge pull request #2778 from cremno/fix-load-size-error-macros
src/load.c: fix size error macros
2015-04-30 12:19:09 +09:00
Yukihiro "Matz" Matsumoto 5d0c8a70e9 Merge pull request #2777 from cremno/fix-parser-locals-null-deref
parser: fix possible null dereferences
2015-04-30 12:17:47 +09:00
Yukihiro "Matz" Matsumoto 8d1f9a6ece Merge pull request #2776 from cremno/undef-strndup
prevent accidental macro redefinition of strndup()
2015-04-30 12:17:14 +09:00
Yukihiro "Matz" Matsumoto 1fefa046cd Merge pull request #2774 from cremno/refactor-mrb_read_irep_file
mrb_read_irep_file(): unify error handling / fix uint underflow
2015-04-30 12:16:21 +09:00
cremno c579ab1c8b always define SIZE_ERROR_MUL() macro
Previously there wasn't a way to trigger the useful definition, but it
is needed and that in every case to check for integer overflow due to
multiplication and faulty/modified binary files.

Also change existing code to a calloc()-like parameter order.
2015-04-29 17:00:35 +02:00
cremno aaf2615ed6 remove SIZE_ERROR() macro
It's only used once and in that case it isn't necessary anyway, since
size_t must be at least 32 bits wide and
the max. length of a filename is UINT16_MAX.
2015-04-29 16:41:45 +02:00
cremno 4a82b9391a add more descriptive error message and fail earlier 2015-04-29 16:37:35 +02:00
cremno c18212573c fix null dereference (ref: #2769)
parser_state->locals might be a null pointer.

Fixes (and other similiar invalid code):
def a; Proc.new do def x==x end end
2015-04-28 19:03:58 +02:00
cremno 8789a5d520 prevent accidental macro redefinition of strndup() 2015-04-28 17:51:34 +02:00
cremno 091ce867c1 fix possible unsigned integer underflow
buf_size has to be greater than header_size, otherwise subtracting
header_size from buf_size will cause an integer underflow.

Being equal to header_size is fine, however useless, so quit early.
2015-04-28 15:02:39 +02:00
cremno 0518ab22c4 unify error handling
Convert mrb_read_irep_file() to use goto like read_section_lv() and
read_section_debug() already do.
2015-04-28 14:40:22 +02:00
Yukihiro "Matz" Matsumoto 41e6931987 Merge pull request #2773 from syohex/fix-misspelling
Fix misspellings in document
2015-04-27 21:54:25 +09:00
Syohei YOSHIDA c261c01598 Fix misspellings in document 2015-04-27 09:35:55 +09:00
Yukihiro "Matz" Matsumoto 5c25a9a6a9 C++ compilation failed due to skipping iniitalization by goto out_super 2015-04-27 02:50:42 +09:00
Yukihiro "Matz" Matsumoto f1164487e1 Merge branch 'master' of github.com:mruby/mruby 2015-04-27 00:54:36 +09:00
Yukihiro "Matz" Matsumoto bdb9d4d19c super should not be called outside of a method; fix #2770 2015-04-27 00:53:08 +09:00
Yukihiro "Matz" Matsumoto b3b6fe3c07 parser_state->locals may be NULL on some error conditions; fix #2769 2015-04-27 00:52:53 +09:00
Yukihiro "Matz" Matsumoto ed3a253372 Merge pull request #2772 from furunkel/bench_task
Add rake task for benchmarking
2015-04-25 17:55:34 +09:00
furunkel ed03b17bb4 Remove benchmarks not in mruby 2015-04-24 22:10:11 +02:00
furunkel 6110b385a7 Output PNG instead of PDF 2015-04-24 21:58:27 +02:00
furunkel 105f1f38a9 Add some of MRI's benchmarks 2015-04-24 19:34:39 +02:00
furunkel 00518e0a4b Use separate build config directory for benchmark files 2015-04-24 16:24:31 +02:00
furunkel bb1951a8b6 Include name of current build config in data directory name 2015-04-24 14:54:35 +02:00
furunkel 01ee28d89d Rename 2015-04-24 14:22:43 +02:00
furunkel 8f5ec1a60f Let all benchmarks start with bm_ 2015-04-24 14:19:51 +02:00
furunkel 465d7a23c8 Add build files for benchmarkings; add mandelbrot benchmark 2015-04-24 13:40:54 +02:00
furunkel 96d66f6d24 Don't echo to stdout 2015-04-23 22:34:22 +02:00