summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
AgeCommit message (Collapse)Author
2019-04-23Fixed the condition in `mrb_funcall_with_block`; fix #4389Yukihiro "Matz" Matsumoto
2019-04-16Fixed a bug in recursive `mrb_top_run` calls; fix #4384Yukihiro "Matz" Matsumoto
2019-04-14Extract similar codes to macros for math opcode in `mrb_vm_exec`KOBAYASHI Shuji
2019-04-13Fix broken NaN with `MRB_NAN_BOXING`KOBAYASHI Shuji
Example: $ bin/mruby -e '(Float::INFINITY - Float::INFINITY).nan?' zsh: segmentation fault Cause: `SET_FLOAT_VALUE` is not used. It is needed for normalizing NaN. Treatment: In my environment, this issue could be reproduced only when `infinity - infinity`, however `SET_FLOAT_VALUE` should be used in all arithmetic operations (regardless of boxing setting), I think. So I fixed all similar codes by extracting to macro.
2019-04-12Small refactoring in `mrb_funcall_with_block`.Yukihiro "Matz" Matsumoto
2019-04-06Remove unused `mrb_proc_cfunc_p()`KOBAYASHI Shuji
2019-03-26Fix missing `MRB_API` prefix for functions below; clse #4267Yukihiro "Matz" Matsumoto
Functions to add prototypes to headers: * mrb_ary_splice() * mrb_notimplement() * mrb_vformat() * mrb_cstr_to_dbl() * mrb_cstr_to_inum() Functions to be made `static` (`MRB_API` was not needed): * mrb_mod_module_function() * mrb_obj_hash() * mrb_str_len_to_inum() Functions to remove `MRB_API` from definitions (referenced from within `libmruby`): * mrb_mod_cv_defined() * mrb_mod_cv_get() * mrb_f_send()
2019-02-11No strict argument check for blocks when keyword arguments exist; ref #4270Yukihiro "Matz" Matsumoto
2018-12-23Suppress a struct initializer warningKOBAYASHI Shuji
Suppress a compiler (clang) warning bellow: src/vm.c:104:38: warning: suggest braces around initialization of subobject [-Wmissing-braces] const mrb_value mrb_value_zero = { 0 }; ^ {}
2018-12-10Need to clear stack before invoking a block; fix #4181Yukihiro "Matz" Matsumoto
2018-11-20Restrict total recursion number of `ecall()`; fix #3789Yukihiro "Matz" Matsumoto
2018-11-19Add Hash type check for `OP_KARG` and `OP_KEY_P`; ref #4166Yukihiro "Matz" Matsumoto
2018-11-19The current context may be changed in `mrb_vm_exec`; ref #3668 #4104Yukihiro "Matz" Matsumoto
2018-11-19Protect Fiber from GC in `ecall()`; fix #4104Yukihiro "Matz" Matsumoto
2018-11-15The saved `pc` from `ERR_PC_SET` was wrong; fix #4138Yukihiro "Matz" Matsumoto
The saving `pc` position should be beginning of the instruction. But after `mruby 2.0` byte code modification, the `pc` variable points the beginning of the next instruction. We save the previous position in a local variable `pc0`.
2018-11-05Fixed wrong `ArgumentError` with keyword arguments; fix #4159Yukihiro "Matz" Matsumoto
2018-11-05Fixed a bug in argument number check with kwargs; fix #4159Yukihiro "Matz" Matsumoto
2018-11-02Remove reserved symbols for now.Yukihiro "Matz" Matsumoto
It should be done by planned embedded symbols.
2018-11-02Merge pull request #4151 from take-cheeze/remove_op_symidxYukihiro "Matz" Matsumoto
Reduce instruction size
2018-11-01Silence Appveyor's VC compilation warnings.Yukihiro "Matz" Matsumoto
2018-11-01Fixed a bug in INIT_DISPATCH for non direct threading; fix #4153Hiroshi Mimaki
2018-10-29Fix operatortake-cheeze
2018-10-29Fix SEGVtake-cheeze
2018-10-29Reduce instruction sizetake-cheeze
2018-10-29We need no write barrier here; ref #4143Yukihiro "Matz" Matsumoto
2018-09-26Small refactoring in vm.cYukihiro "Matz" Matsumoto
2018-09-21Add compiler flag to disable direct threading (#4075)sbsoftware
* Add option to disable direct threading * Prepend MRB_ to option name
2018-09-21Fixed a top-level local variable bug in `mirb`.Yukihiro "Matz" Matsumoto
`OP_STOP` returned a wrong value.
2018-09-07Clear terminated spacedearblue
2018-09-05Add `argv` and `argc` check in `OP_ENTER`; fix #4102Yukihiro "Matz" Matsumoto
`argv` may be retrieved from an array whose `ptr` is `NULL` when it`s empty.
2018-09-04Add type casts to silence MSVC warnings.Yukihiro "Matz" Matsumoto
2018-09-01Avoid warning in MSVC compilation.Yukihiro "Matz" Matsumoto
2018-08-30Use `mrb_ensure_hash_type()` to check if an operand is a `Hash`; fix #4097Yukihiro "Matz" Matsumoto
2018-08-30Need to clear `mrb->c->cibase->ridx` (toplevel ridx) at L_STOP; fix #4092Yukihiro "Matz" Matsumoto
This problem only appears when `mrb` executed multiple times (i.e. `mirb`)
2018-08-30The operand of `OP_ARYDUP` may not be an array; fix #4094Yukihiro "Matz" Matsumoto
This commit also fix #4096.
2018-08-29Fix off-by-one error in `OP_EPUSH` and `OP_ONERR`; fix #4095Yukihiro "Matz" Matsumoto
2018-08-29Check the size of rescue&ensure stacks; ref #4088Yukihiro "Matz" Matsumoto
Those small stack indexes can cause integer overflow.
2018-08-25Reduce integer casting warnings.Yukihiro "Matz" Matsumoto
2018-08-25fixup! New bytecode implementation of mruby VM.Yukihiro "Matz" Matsumoto
2018-08-25Hash splat `**` should not be ignored.Yukihiro "Matz" Matsumoto
Implemented by adding `OP_HASHCAT` that merges hashes.
2018-08-25Fixed a bug in `OP_HASHADD`.Yukihiro "Matz" Matsumoto
2018-08-25Add bytecode support for `MRB_WORD_BOXING`.Yukihiro "Matz" Matsumoto
2018-08-25New bytecode implementation of mruby VM.Yukihiro "Matz" Matsumoto
2018-08-25Remove utility functions: `mrb_vm_iv_{get,set}`.Yukihiro "Matz" Matsumoto
2018-08-25Remove `nregs` member from `mrb_callinfo`.Yukihiro "Matz" Matsumoto
This means reducing one word per a call frame.
2018-07-31Removed unused instruction: `OP_KDICT`.Yukihiro "Matz" Matsumoto
2018-07-31Fixed a small bug in keyword argument parsing.Yukihiro "Matz" Matsumoto
def m(a=1,**k) p [a,k] end m(a: 1)
2018-07-30Keyword argument implemented.Yukihiro "Matz" Matsumoto
2018-07-30New bytecode implementation of mruby VM.Yukihiro "Matz" Matsumoto
2018-06-14Restore GC arena after raised exceptions; ref #4042Yukihiro "Matz" Matsumoto