Tomasz Dąbrowski
72ed7eebc3
Fixed Range.size to use proper floating point tolerance
2016-11-24 12:50:49 +01:00
Tomasz Dąbrowski
18757c8f7b
Different method of compiling C as C++ (-x c++)
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
00e6121260
Safeguard against trying to use C++ exception handling in C code
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
1af9e363f2
Fixes for compiling mruby as C++
2016-11-24 09:28:00 +09:00
Tomasz Dąbrowski
52b40cb4d0
Fixed extern "C" to use MRB_BEGIN/END_DECL in re.h
2016-11-22 13:34:40 +01:00
Tomasz Dąbrowski
b21b02465e
asserts checking validity of pointer and TT added for mrb_obj_value
...
Useful for testing when using boxing on different platforms.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski
c385782cfe
mrb_assert definition moved to the beggining of mruby.h
...
So that other files can immediately use it.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski
8cdaf1ed35
Fixed NaN boxing for 64-bit configrations on platforms that use full 48-bit usermode pointers
...
Definition of boxed pointer is following:
`111111111111TTTT TTPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP`
Previously, only the last 32-bit were set, and remaining 14 bits were zeroed when setting `ttt`.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski
d86f5d2dca
mruby architecture detection
2016-11-21 12:37:45 +01:00
Herwin Weststrate
18d6994f78
Documented most methods in mruby/hash.h
2016-11-17 11:52:28 +01:00
Herwin Weststrate
d20c56c7fa
Documented most methods in mruby/array.h
2016-11-17 11:41:49 +01:00
Herwin Weststrate
c043dc631e
Typo fix: poped => popped
2016-11-17 11:05:27 +01:00
Yukihiro "Matz" Matsumoto
8438792d27
renamed "inline" to "istruct" to represent inline struct; ref #3251
2016-11-17 17:19:49 +09:00
Tomasz Dąbrowski
4cca8bac6b
inline structures data type for mruby (MRB_TT_INLINE) ( fix #3237 )
...
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
2016-11-17 17:19:49 +09:00
Yukihiro "Matz" Matsumoto
739dad6e87
Fixed a memory problem in Array#to_h
...
Reported from Alex Snaps via Mathieu Leduc-Hamel,
both from shopify.com. Thank you!
2016-11-16 01:29:04 +09:00
Felix Jones
e3c8092ccd
Renamed class_under_defined to class_defined_under
2016-11-10 19:51:56 +00:00
Felix Jones
cc5f40b2db
mrb_class_under_defined docs renamed parent and child to outer and inner
2016-11-06 13:19:14 +00:00
Felix Jones
8d6aa06548
Added mrb_class_under_defined
2016-11-06 13:01:21 +00:00
Nobuyoshi Nakada
6511bfd79a
Removed trailing spaces
2016-09-28 12:29:41 +09:00
Yukihiro "Matz" Matsumoto
afbe211c60
mrb_str_strlen() should be MRB_API; ref #3216
2016-09-27 10:29:56 +09:00
Kazuaki Tanaka
cb29c9b415
Fix return value type of bytecode_decoder
2016-09-20 23:15:49 +00:00
Kazuaki Tanaka
968ebac001
Bytecode decoder support, MRB_BYTECODE_DECODE_OPTION
2016-09-20 23:07:28 +00:00
William Light
e02a88e031
make mrb_hash_values() a public API function
2016-08-01 11:05:46 +02:00
Ralph Desir(Mav7)
189ad47346
yard docs for string.h
2016-07-23 02:47:32 -04:00
Yukihiro "Matz" Matsumoto
d4d807b774
relax string length limitation to 64KB; fix #2725
2016-07-13 03:22:15 +09:00
Junichi Kajiwara
f67631afb4
C doesn't have try-catch
2016-07-08 06:30:45 +09:00
cremno
6369374f79
add mrb_int_mul_overflow(); close #3149
...
- call __builtin_mul_overflow() if it's available
- perform a 64-bit multiplication for 32-bit mrb_int (default)
- otherwise a much slower method is used
2016-05-10 19:10:49 +02:00
cremno
7276e84637
use type-generic checked arithmetic builtins
...
Version checking is not reliable - especially with Clang.
E.g. Apple's Clang (Xcode) uses different version numbers.
A feature check (__has_builtin) is the recommened way.
Add the MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS
macro which may be used in other files.
2016-05-09 16:52:57 +02:00
cremno
39b6a9dafc
define macros only if builtins are n/a
2016-05-09 16:34:20 +02:00
cremno
30b0100e6c
fix VS2010/2012 build
...
They don't have <inttypes.h>, only <stdint.h>.
2016-03-22 11:46:49 +01:00
Yukihiro "Matz" Matsumoto
0c28c7d754
change backtrace sep from const char* to char
2016-03-07 10:59:34 +09:00
Yukihiro "Matz" Matsumoto
3c73c315f4
Hash: check flags before accessing ifnone; ref #980
2016-02-05 10:08:28 +09:00
Yukihiro "Matz" Matsumoto
25e4ec3f37
cache UTF8 status for utf8_strlen(); ref #980
2016-02-04 23:33:16 +09:00
Yukihiro "Matz" Matsumoto
5e514c910f
cache mrb_regexp_p(); ref #980
2016-02-04 23:22:01 +09:00
Prayag Verma
70283a94a5
Update license year range to 2016
2016-01-18 08:55:12 +05:30
Yukihiro "Matz" Matsumoto
f7afe1d82a
change mrb_run related API names; compatibility macros provided
2016-01-07 22:36:29 +09:00
Yukihiro "Matz" Matsumoto
725b3ca5a7
move KHASH_DECLARE(ht..) to mruby/hash.h; close #3073
2016-01-07 12:46:38 +09:00
Yukihiro "Matz" Matsumoto
7c82bfa7fe
mruby-sprintf to use mrb_int formatting macros; ref #3076
2016-01-07 12:23:17 +09:00
Kazuho Oku
cd131d18a7
define MRB_PRI? that map to PRI?NN depending on the size of mrb_int
2016-01-06 12:00:56 +09:00
Yukihiro "Matz" Matsumoto
bd462c5edc
mruby-fiber: fiber_switch() to use nesting VM when it's called from C API or mrb_funcall(); close #3056
2016-01-02 13:48:45 +09:00
Kazuho Oku
121c6e30aa
use _setjmp/_longjmp on other BSD flavors
2016-01-01 06:48:53 +09:00
Kazuho Oku
f4bb329c74
use _setjmp/_longjmp on OS X
2016-01-01 06:24:49 +09:00
Yukihiro "Matz" Matsumoto
3531fe179c
GC must scan env from fibers even when it's not yet copied to heap; fix #3063
2015-12-31 00:11:37 +09:00
Kouhei Sutou
a561bdb25f
Support backtrace after method calls
...
GitHub: fix #2902 , #2917
The current implementation traverses stack to retrieve backtrace. But
stack will be changed when some operations are occurred. It means that
backtrace may be broken after some operations.
This change (1) saves the minimum information to retrieve backtrace when
exception is raised and (2) restores backtrace from the minimum
information when backtrace is needed. It reduces overhead for creating
backtrace Ruby objects.
The space for the minimum information is reused by multiple
exceptions. So memory allocation isn't occurred for each exception.
2015-12-29 20:36:12 +09:00
Ralph Desir
af33394281
Undid newline and whitespace on YARD doc
2015-12-12 20:21:53 -05:00
Ralph Desir
e27985416f
One space indentation.
2015-12-12 18:28:42 -05:00
Ralph Desir(Mav7)
4e267d74c6
Added YARD docs in new mruby.h
2015-12-11 01:52:44 -05:00
Yukihiro "Matz" Matsumoto
36fabe104b
new API function mrb_string_value_len()
2015-12-01 16:18:01 +09:00
Yukihiro "Matz" Matsumoto
065966dae4
common.h are supposed to be included from other header, so call it with quotes; ref #3032
2015-11-28 00:10:38 +09:00
Yukihiro "Matz" Matsumoto
5c405dea3d
include changed from by quotes ("") to by brackets (<>); close #3032
2015-11-27 17:48:23 +09:00