summaryrefslogtreecommitdiff
path: root/yarvcore.c
AgeCommit message (Collapse)Author
2007-06-06* cont.c (cont_new): add debug message.ko1
* cont.c (cont_restore_1): copy stack information from fiber. * cont.c (rb_fiber_s_new): fix to mark created fiber. * test/ruby/test_fiber.rb: add some tests around Thread and Fiber. * yarvcore.c (thread_free): fix to skip freeing stack if root fiber is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-27* cont.c: support Fiber. Check test/ruby/test_fiber.rb for detail.ko1
Fiber is known as "Micro Thread", "Coroutine", and other terms. At this time, only Fiber#pass is supported to change context. I want to know more suitable method name/API for Fiber (... do you know more suitable class name instead of Fiber?) as "suspend/resume", "call", "yield", "start/kick/stop/restart", .... * eval.c, eval_intern.h, thread.c, yarvcore.c, yarvcore.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-25* yarvcore.c (Init_VM): wrap already initialized structs to usenobu
it directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-24* gc.c, yarvcore.c: fix to mark VM structure on startup.ko1
* yarvcore.h: disable USE_CACHED_VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-23* cont.c: support callcc which everyone love.ko1
incomplete. please give me bug reports. * common.mk, inits.c, thread.c: ditto. * yarvcore.c: export thread_mark(). * yarvcore.h: disable value cache option. * eval_intern.h: set th_get_ruby_level_cfp to inline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-21* compile.c, vm_macro.def: support tail call optimizationko1
(on default, this feature is not enabled). * iseq.c, compile.c, vm_opts.h: add "tailcall_optimization" option. * sample/test.rb (test_ok): fix to adjust tailcall stack layout. * insns.def, vm.c, compile.c, yarvcore.c, yarvcore.h: add opt_gt, opt_le instructions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-03* configure.in, defines.h, eval_load.c (rb_feature_p, rb_provided,nobu
search_required, rb_require_safe), ext/extmk.rb: Fix a bug where a statically linked extension cannot be autoloaded. [ruby-dev:30023] / [ruby-dev:30239] * thread.c: added an internal class, Barrier. * yarvcore.h (struct rb_vm_struct): moved loading_table from global. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-03* vm_evalbody.ci, insns.def, vm.c, tool/insns2vm.rb (rb_num_t):nobu
renamed to get rid of name clash. [ruby-dev:30504] * yarvcore.c (ruby_thread_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-02* vm.c, yarvcore.h, yarvcore.c, insns.def: fix to mark VM stackko1
in correct range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-19* eval.c, node.h, thread.c, yarvcore.[ch], eval_intern.h:ko1
support set_trace_func (incomplete. id and klass don't be passed). And support Thread#set_trace_func which hook only specified thread and Thread#add_trace_func which add new trace func instead of replace old one. C level API was modified. See thread.c (logic) and yarvcore.h (data structures). * vm.c, vm_macro.def: add hook points. * compile.c, insns.def: fix "trace" instruction. * iseq.c, vm_macro.h: add compile option "trace_instruction". * test/ruby/test_settracefunc.rb: hook "c-return" of set_trace_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-17* yarvcore.c (th_init2): push initial blockptr value fornobu
rb_block_given_p() outside ruby_exec(). [ruby-core:10923] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-21* compile.c, parse.y, eval.c, intern.h, iseq.c, lex.c, node.h,ko1
proc.c, vm.c, vm_macro.def, vm_macro.def, yarvcore.c, yarvcore.h, debug.c, debug.h: merge half-baked-1.9 changes. The biggest change is to change node structure around NODE_SCOPE, NODE_ARGS. Every scope (method/class/block) has own NODE_SCOPE node and NODE_ARGS represents more details of arguments information. I'll write a document about detail of node structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-26* yarvcore.h, vm.h: rename th_invoke_yield() to th_yield().ko1
* blockinlining.c: ditto. * eval.c: ditto. * vm.c, insns.def: rename th_invoke_yield_cfunc() to th_yield_with_cfunc(). * yarvcore.h, yarvcore.c: rename theYarvVM to ruby_current_vm and yarvCurrentThread to ruby_current_thread. remove yarvVMArray. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-25* yarvcore.h: add rb_thread_t#top_wrapper, top_self.ko1
* eval_load.c (rb_load): support eval in wrapper module (load(file, true)). * eval.c: ditto. * eval_jump.h: ditto. * iseq.c: ditto. * vm.c: ditto. * yarvcore.c: ditto. * insns.def: add a empty line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-19just a minor changetadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14* vm.(c|h), yarvcore.(c|h) (yarvGlobalStateVersion): rename toko1
ruby_vm_global_state_version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14* eval_load.c, yarvcore.h: use rb_vm_t#loaded_features instead ofko1
rb_features (global variable). * yarvcore.c: mark rb_vm_t#loaded_features. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-08* blockinlining.c, error.c, eval.c, eval_error.h, eval_intern.h,ko1
eval_jump.h, eval_load.c, eval_safe.h, gc.c, proc.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: fix typo (rb_thead_t -> rb_thread_t). * eval_intern.h: remove unused definitions. * common.mk: fix around vm_opts.h path and remove harmful argument passed to insns2vm.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07* this commit is a result of refactoring. only renaming functions,ko1
moving definitions place, add/remove prototypes, deleting unused variables and removing yarv.h. This commit doesn't change any behavior of ruby/vm. * yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h). * error.c, eval_intern.h: include yarvcore.h instead yarv.h * rename some functions: * debug.[ch]: debug_*() -> ruby_debug_*() * iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm() * iseq.c: node_name() -> ruby_node_name() * vm.c: yarv_check_redefinition_opt_method() -> rb_vm_check_redefinition_opt_method() * some refactoring with checking -Wall. * array.c: remove rb_ary_ptr() (unused) and remove unused local variables. * object.c: add a prototype of rb_mod_module_exec(). * eval_intern.h (ruby_cref): set it inline. * eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal(). * parse.y: add a prototype of rb_parse_in_eval() (in eval.c). * process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c). * thread.c: remove raw_gets() function (unused) and fix some format mismatch (format mismatchs have remained yet. this is todo). * thread.c (rb_thread_wait_fd_rw): fix typo on label name. * thread_pthread.ci: comment out codes with USE_THREAD_CACHE. * vm.c (rb_svar, rb_backref_get, rb_backref_get, rb_lastline_get, rb_lastline_set) : moved from yarvcore.c. * vm.c (yarv_init_redefined_flag): add a prototype and rename yarv_opt_method_table to vm_opt_method_table. * vm.c (rb_thread_eval): moved from yarvcore.c. * yarvcore.c: remove unused global variables and fix to use nsdr(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06* blockinlining.c, compile.c, compile.h, error.c, eval.c,ko1
eval_intern.h, eval_jump.h, eval_load.c, eval_method.h, eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c, process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def, yarv.h, yarvcore.h, yarvcore.c: change type and macro names: * yarv_*_t -> rb_*_t * yarv_*_struct -> rb_*_struct * yarv_tag -> rb_vm_tag * YARV_* -> RUBY_VM_* * proc.c, vm.c: move functions about env object creation from proc.c to vm.c. * proc.c, yarvcore.c: fix rb_cVM initialization place. * inits.c: change Init_ISeq() order (after Init_VM). * ruby.h, proc.c: change declaration place of rb_cEnv from proc.c to ruby.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-05* eval_thread.c, common.mk: remove eval_thread.c.ko1
* yarvcore.c: rename cYarvThread to rb_cThread. * gc.c: remove YARV_* prefix. * gc.h: add an include guard and prototype of rb_gc_set_stack_end(). * inits.c: fix to ANSI prototype style and reorder Init_*(). * io.c (pipe_finalize): TODO: comment out last_status. * process.c, yarvcore.h: fix to use yarv_vm_t#last_status instead of rb_last_status and make last_status_get() to access $?. * yarvcore.c (vm_mark): mark yarv_vm_t#last_status. * ruby.h: add declarations of rb_cISeq and rb_cVM. * thread.c: move eval_thread.c codes to thread.c and remove yarv_* function prefix. * thread.c (thread_start_func_2): use yarv_thread_t#first_func if it is not null. * vm.c: fix copyright year. * yarvcore.c (Init_vm): rename to Init_VM(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-02* call_cfunc.ci, compile.c, compile.h, debug.h, eval.c,nobu
eval_error.h, eval_jump.h, eval_load.c, eval_thread.c, gc.c, insnhelper.h, insns.def, iseq.c, main.c, numeric.c, parse.y, range.c, regenc.h, ruby.h, signal.c, thread.c, thread_win32.ci, vm.c, vm.h, vm_dump.c, vm_evalbody.ci, yarvcore.c, yarvcore.h: fixed indents and non-C90 comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-17* some refactoring around yarvcore and proc.ko1
* eval_proc.c: renamed to proc.c. * common.mk: ditto. * yarvcore.h, yarvcore.c: rename or remove some global variables removed: mYarvCore, mYarvInsns renamed: cYarvISeq -> rb_cISeq, cYarvProc -> rb_cProc, cYarvBinding -> rb_cBinding ::YarvCore module is removed and ::YarvCore::VM class becomes ::VM. And change/remove some functions which added with YARV. * compile.c: ditto. * eval.c: ditto. * iseq.c: ditto. * vm.c: ditto. * inits.c: rename Init_yarvcore to Init_vm. * yarvcore.c, proc.c: move some functions and initialization from yarvcore.c to proc.c. * intern.h, proc.c: add global function rb_binding_new(void). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-16* eval_proc.c (rb_proc_new): added.ko1
* string.c (sym_to_proc): supported. * vm.c (invoke_block, th_invoke_yield, th_invoke_proc): fix to support rb_proc_new. * yarvcore.c: add a test code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-06* insns.def : support direct method dispatch with "send" or "funcall".ko1
This means that "obj.send :m" skips "BasicObject#send" invocation (method frame creation, etc) and "obj.m" invokes directly. If you make backtrace, there are no enties of "send" method. * compile.c (iseq_specialized_instruction) : fix to support above * eval.c : ditto (remove "static" from rb_f_send and rb_f_funcall * yarvcore.c : ditto (add a external IDs for compiler) * yarvcore.h : ditto (add a VM_CALL_SEND_BIT macro) * yarvtest/test_method.rb : add tests for above changes * eval.c : remove unused "Kernel#send" declaration git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-04* yarv_version.h : removed.ko1
* common.mk : remove yarv_version.h from rules * yarvcore.h (Init_yarvcore) : remove useless constants git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 * Merge YARVko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e