Commit Graph

7219 Commits

Author SHA1 Message Date
cremno bfc7b2e30f deprecate Visual Studio 2010 and 2012 2016-03-22 11:41:16 +01:00
cremno 611e99e741 remove unnecessary array/each 2016-03-22 11:38:09 +01:00
Yukihiro "Matz" Matsumoto 2b0baec32a fixed silly class variable/constant confusion; #3138 2016-03-22 00:06:32 +09:00
Yukihiro "Matz" Matsumoto a02acf2635 rescue NameError from class variable access like @@foo ||= 42; fix #3138 2016-03-21 03:49:08 +09:00
Yukihiro "Matz" Matsumoto 643d967b10 Merge pull request #3131 from bggd/fix_bintest_on_windows
Fix doesn't work bintest on :visualcpp toolchain
2016-03-16 16:29:14 +09:00
Yukihiro "Matz" Matsumoto 52d388515f Merge pull request #3132 from pbosetti/edison
Added example for cross-compiling on Intel Edison
2016-03-16 16:28:35 +09:00
Yukihiro "Matz" Matsumoto 273eac6b64 Merge pull request #3136 from bggd/add_appveyor
Add appveyor.yml
2016-03-16 16:27:58 +09:00
bggd 51cb72962d Create appveyor_config.rb 2016-03-15 20:43:51 +09:00
bggd 87e5b0f30c Add appveyor.yml for Visual Studio 2015/2013 2016-03-15 20:41:15 +09:00
Yukihiro "Matz" Matsumoto 4f20d58ac2 Merge pull request #3135 from wanabe/reduce-include-paths
Reduce compiler include_paths
2016-03-14 09:35:53 +09:00
wanabe 2aa6b449a2 Reduce compiler include_paths 2016-03-13 17:06:39 +09:00
Paolo Bosetti a27426aa8d Added example for cross-compiling on Intel Edison 2016-03-07 17:50:03 +01:00
bggd a138ae3506 Fix doesn't work bintest on :visualcpp toolchain 2016-03-07 14:50:21 +09:00
Yukihiro "Matz" Matsumoto 41d6ba23b5 fix dump_prefix() with wrong type argument; fix #3128 2016-03-07 10:59:34 +09:00
Yukihiro "Matz" Matsumoto 0c28c7d754 change backtrace sep from const char* to char 2016-03-07 10:59:34 +09:00
Yukihiro "Matz" Matsumoto 4e95779851 Merge pull request #3125 from zzak/default-benchmark-build-config
Add default benchmark build config
2016-03-07 10:27:36 +09:00
Yukihiro "Matz" Matsumoto b4d946f6bc Merge pull request #3129 from kou/fix-segv-by-backtrace-and-gc
Fix SEGV by backtrace and GC
2016-03-06 12:15:55 +09:00
Yukihiro "Matz" Matsumoto 1a4540fb4a Merge pull request #3127 from kou/suppress-warning
Suppress a warning
2016-03-06 12:13:05 +09:00
Kouhei Sutou f1eb3aea11 Fix segmentation fault by backtrace and GC
GitHub: fix #3122

It reverts #3126. #3126 fixes the segmentation fault but generates
broken backtrace.

This change fixes the segmentation fault and generates correct
backtrace. The strategy of this change is "generating backtrace while
irep is alive".

/tmp/test.rb:
    def gen
      e0 = nil
      begin
        1.times {
          raise 'foobar'
        }
      rescue => e
        e0 = e
      end
      e0
    end

    e = gen
    GC.start
    gen
    GC.start

    puts e.backtrace.join("\n")

Run:

    % bin/mruby /tmp/test.rb
    /tmp/test.rb:5:in Object.gen
    /home/kou/work/ruby/mruby.kou/mrblib/numeric.rb:77:in Integral#times
    /tmp/test.rb:4:in Object.gen
    /tmp/test.rb:13

FYI:

    % ruby -v /tmp/test.rb
    ruby 2.3.0p0 (2015-12-25) [x86_64-linux-gnu]
    /tmp/test.rb:5:in `block in gen'
    /tmp/test.rb:4:in `times'
    /tmp/test.rb:4:in `gen'
    /tmp/test.rb:13:in `<main>'
2016-03-06 11:58:54 +09:00
Kouhei Sutou d77c72dac5 Revert "Merge pull request #3126 from jbreeden/backtrace_irep_null_check"
This reverts commit bf7719fe8d, reversing
changes made to 4f4fa0ade0.

We should get backtrace while irep is alive.
2016-03-06 11:51:04 +09:00
Kouhei Sutou e5cce388ff Suppress a warning
mrbgems/mruby-eval/src/eval.c: In function ‘create_proc_from_string’:
    mrbgems/mruby-eval/src/eval.c:152:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         file = "(eval)";
              ^
2016-03-06 10:05:14 +09:00
Yukihiro "Matz" Matsumoto bf7719fe8d Merge pull request #3126 from jbreeden/backtrace_irep_null_check
Null check for irep & initialize loc.lineno
2016-03-06 08:44:15 +09:00
jbreeden d2a8f7e0cc Fix Travis CI 2016-03-05 14:22:31 -08:00
jbreeden e02ff850fe Null check for irep & initialize loc.lineno 2016-03-05 13:45:56 -08:00
Zachary Scott aa90ad57fe Add default benchmark build config 2016-03-04 16:14:13 +09:00
Yukihiro "Matz" Matsumoto 4f4fa0ade0 Merge pull request #3121 from asfluido/master
The original code crashed when mrb->backtrace.n grew to 16.
2016-02-29 10:22:00 +09:00
Carlo Prelz d6cbe1bfc6 The original code crashed when mrb->backtrace.n grew to 16.
It looks like the logic to reallocate the backtrace was flawed,
based on the wrong variable (loc_raw->i, which, as I have verified,
decreases from 16 to 0 instead of increasing)

I am not sure if this is the correct fix
2016-02-26 09:21:33 +01:00
Yukihiro "Matz" Matsumoto 0c23d5a353 Merge pull request #3120 from rmalizia44/patch-1
Avoid Error when Compiling with -std=c99 flag
2016-02-25 08:55:41 +09:00
Malizia R 52aba8a706 Avoid Error when Compiling with -std=c99 flag 2016-02-24 16:39:38 -03:00
Yukihiro "Matz" Matsumoto b8479b62d8 too many register push for else-less condtions; fix #3117 2016-02-22 09:55:51 +09:00
Yukihiro "Matz" Matsumoto 81acbd2dd1 cosmetic change for OP_EQ 2016-02-22 09:38:20 +09:00
Yukihiro "Matz" Matsumoto cf5ca03676 mruby-struct: copied Struct length is not initialized; fix #3114 2016-02-19 11:46:18 +09:00
Yukihiro "Matz" Matsumoto 819c9da8d2 peephole optimization for LOADNIL before STRCAT; ref #3110 2016-02-17 11:03:27 +09:00
Yukihiro "Matz" Matsumoto d8fc09cf92 push value for NULL AST when value is required; fix #3110 2016-02-17 11:02:29 +09:00
Yukihiro "Matz" Matsumoto ec35e549ad need to free context when reclaiming fiber object in GC; fix #3109 2016-02-17 10:19:14 +09:00
Yukihiro "Matz" Matsumoto da96c335fe syntax error in interpolated symbol; fixed #3108 2016-02-16 11:33:58 +09:00
Yukihiro "Matz" Matsumoto 5596d14c00 Merge pull request #3107 from mame/fix-enum-hash
[255, 255, 255, 255, 255].hash raises "can't convert Float into Integer"
2016-02-16 10:43:12 +09:00
Yukihiro "Matz" Matsumoto 683ff0cbd0 Merge pull request #3106 from mame/fix-eval-no-filename
Fix segfault when `eval("__FILE__")` is executed
2016-02-16 10:42:28 +09:00
Yusuke Endoh a1a157b27e suppress "can't convert Float into Integer" in Enumerable#hash 2016-02-16 00:07:50 +09:00
Yusuke Endoh 668cc1b435 Fix segfault when eval("__FILE__") is executed 2016-02-15 23:57:18 +09:00
Yukihiro "Matz" Matsumoto 74d52a11f2 Merge pull request #3101 from deuwert/fix-test-build
Fix bug in mruby-test gem (fix #3094)
2016-02-12 08:27:55 +09:00
Yukihiro "Matz" Matsumoto 60c1ed4461 Merge pull request #3102 from deuwert/add-limits
Add more limitations
2016-02-12 08:27:04 +09:00
Daniel Bovensiepen 299cb5a7b9 Fix formatting again... 2016-02-12 03:37:36 +08:00
Daniel Bovensiepen 46fbd5349b Add more limitations:
- defined?
  - alias on global variables
  - Operator modification
  - Kernel.binding missing
2016-02-12 03:32:41 +08:00
Daniel Bovensiepen 5976185c0a Fix bug in mruby-test gem.
In an used build path mruby-test wasn't updating mrbtest.c in the
case that the mgem selection was changed. This lead to:
  - a missing reference in case a GEM was removed
  - ignoring all new GEMs added to the build configuration

This fix keeps track of the active gems and demands a rebuild of
mrbtest.c in case that the gem selection changed.
2016-02-12 02:19:18 +08:00
Yukihiro "Matz" Matsumoto 37344ecaad fixed typos in limitations.md 2016-02-12 00:54:07 +09:00
Yukihiro "Matz" Matsumoto 473827d1d1 Merge pull request #3100 from deuwert/toolchain-openwrt
Add toolchain support for OpenWRT
2016-02-12 00:48:13 +09:00
Yukihiro "Matz" Matsumoto f40fc9ab69 Merge pull request #3099 from deuwert/more-limits
Addition to mruby limitation documentation
2016-02-12 00:46:28 +09:00
Daniel Bovensiepen fcbaafaa2c Add toolchain support for OpenWRT 2016-02-11 21:32:42 +08:00
Daniel Bovensiepen e7eb40f9d6 Fix formatting 2016-02-11 21:23:29 +08:00