summaryrefslogtreecommitdiff
path: root/vm.c
AgeCommit message (Collapse)Author
2013-11-22* vm.c (ruby_vm_destruct): do not use ruby_xfree() after freeingko1
objspace. * gc.c (ruby_mimfree): added. It is similar to ruby_mimmalloc(). * internal.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09* compile.c (iseq_compile_each): emit opt_str_freeze if the #freezecharliesome
method is called on a static string literal with no arguments. * defs/id.def (firstline): add freeze so idFreeze is available * insns.def (opt_str_freeze): add opt_str_freeze instruction which pushes a frozen string literal without allocating a new object if String#freeze is not overriden * string.c (Init_String): define String#freeze * vm.c (vm_init_redefined_flag): define BOP_FREEZE on String class as a basic operation * vm_insnhelper.h: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-09* class.c: unify names of vm state version counters to 'serial'.charliesome
This includes renaming 'vm_state_version_t' to 'rb_serial_t', 'method_state' to 'method_serial', 'seq' to 'class_serial', 'vmstat' to 'constant_serial', etc. * insns.def: ditto * internal.h: ditto * vm.c: ditto * vm_core.h: ditto * vm_insnhelper.c: ditto * vm_insnhelper.h: ditto * vm_method.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05* gc.c: add support to estimate increase of oldspace memory usage.ko1
This is another approach to solve an issue discussed at r43530. This feature is diabled as default. This feature measures an increment of memory consuption by oldgen objects. It measures memory consumption for each objects when the object is promoted. However, measurement of memory consumption is not accurate now. So that this measurement is `estimation'. To implement this feature, move memsize_of() function from ext/objspace/objspace.c and expose rb_obj_memsize_of(). Some memsize() functions for T_DATA (T_TYPEDDATA) have problem to measure memory size, so that we ignores T_DATA objects now. For example, some functions skip NULL check for pointer. The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature, and turned off as default. We need to compare 3gen GC and this feature carefully. (it is possible to enable both feature) We need a help to compare them. * internal.h: expose rb_obj_memsize_of(). * ext/objspace/objspace.c: use rb_obj_memsize_of() function. * cont.c (fiber_memsize): fix to check NULL. * variable.c (autoload_memsize): ditto. * vm.c (vm_memsize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* add RUBY_TYPED_FREE_IMMEDIATELY to data types which only useko1
safe functions during garbage collection such as xfree(). On default, T_DATA objects are freed at same points as fianlizers. This approach protects issues such as reported by [ruby-dev:35578]. However, freeing T_DATA objects immediately helps heap usage. Most of T_DATA (in other words, most of dfree functions) are safe. However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default for safety. * cont.c: ditto. * dir.c: ditto. * encoding.c: ditto. * enumerator.c: ditto. * error.c: ditto. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * iseq.c: ditto. * marshal.c: ditto. * parse.y: ditto. * proc.c: ditto. * process.c: ditto. * random.c: ditto. * thread.c: ditto. * time.c: ditto. * transcode.c: ditto. * variable.c: ditto. * vm.c: ditto. * vm_backtrace.c: ditto. * vm_trace.c: ditto. * ext/bigdecimal/bigdecimal.c: ditto. * ext/objspace/objspace.c: ditto. * ext/stringio/stringio.c: ditto. * ext/strscan/strscan.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: splitcharliesome
ruby_vm_global_state_version into two separate counters - one for the global method state and one for the global constant state. This means changes to constants do not affect method caches, and changes to methods do not affect constant caches. In particular, this means inclusions of modules containing constants no longer globally invalidate the method cache. * class.c, eval.c, include/ruby/intern.h, insns.def, vm.c, vm_method.c: rename rb_clear_cache_by_class to rb_clear_method_cache_by_class * class.c, include/ruby/intern.h, variable.c, vm_method.c: add rb_clear_constant_cache * compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in rb_call_info_struct to method_state * vm_method.c: rename vmstat field in struct cache_entry to method_state git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28* vm.c: vm_clear_all_cache is not necessary now we use a 64 bit countercharliesome
for global state version. * vm_insnhelper.h: ruby_vm_global_state_version overflow is unnecessary git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-13vm.c: initialize defined_module_hash earlynobu
* vm.c (Init_BareVM): initialize defined_module_hash here, Init_top_self() is too late to register core classes/modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-13compile.c, vm.c: reduce hash mergenobu
* compile.c (compile_array_): no hash to merge if it is empty. * vm.c (m_core_hash_merge_kwd): just check keys if only one argument is given, without merging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-11* class.c, variable.c, gc.c (rb_class_tbl): removed.ko1
* vm.c, vm_core.h (rb_vm_add_root_module): added to register as a defined root module or class. This guard helps mark miss from defined classes/modules they are only refered from C's global variables in C-exts. Basically, it is extension's bug. Register to hash object VM has. Marking a hash objects allows generational GC supports. * gc.c (RGENGC_PRINT_TICK): disable (revert). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10* vm.c (vm_exec): support :b_return event for "lambda{return}.call".ko1
[Bug #8622] * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10vm.c: hide singleton class of frozen-corenobu
* vm.c (Init_VM): hide also the singleton class of frozen-core, not only frozen-core itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-26* insns.def (opt_regexpmatch2): Check String#=~ hasn't overriddensorah
before calling rb_reg_match(). * test/ruby/test_string.rb: Test for above. * vm.c (vm_init_redefined_flag): Add BOP flag for String#=~ [ruby-core:57385] [Bug #8953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-26* insns.def (opt_regexpmatch1): check Regexp#=~ is not defined beforecharliesome
calling rb_reg_match() * test/ruby/test_regexp.rb: add test * vm.c (ruby_vm_redefined_flag): change type to short[] * vm.c (vm_redefinition_check_flag): return REGEXP_REDEFINED_OP_FLAG if klass == rb_cRegexp * vm.c (vm_init_redefined_flag): setup BOP flag for Regexp#=~ * vm_insnhelper.h: add REGEXP_REDEFINED_OP_FLAG [ruby-core:57385] [Bug #8953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04vm.c: prototypenobu
* vm.c (rb_next_class_sequence): use ANSI style definition and prorotype declaration, instead of old-K&R style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-04* class.c, compile.c, eval.c, gc.h, insns.def, internal.h, method.h,charliesome
variable.c, vm.c, vm_core.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: Implement class hierarchy method cache invalidation. [ruby-core:55053] [Feature #8426] [GH-387] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22* compile.c (rb_iseq_compile_node): accept NODE_IFUNC to supportko1
custom compilation. * compile.c (NODE_POSTEXE): compile to "ONCE{ VMFrozenCore::core#set_postexe{...} }" with a new custom compiler `build_postexe_iseq()'. * vm.c (m_core_set_postexe): remove parameters (passed by a block). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-20* insns.def: fix regexp's once option behavior.ko1
fix [ruby-trunk - Bug #6701] * insns.def: remove `onceinlinecache' and introduce `once' instruction. `once' doesn't use `setinlinecache' insn any more. * vm_core.h: `union iseq_inline_storage_entry' to store once data. * compile.c: catch up above changes. * iseq.c: ditto. * vm.c, vm_insnhelper.c: ditto. fix `m_core_set_postexe()' which is depend on `onceinlinecache' insn. * test/ruby/test_regexp.rb: add tests. * iseq.c: ISEQ_MINOR_VERSION to 1 (should increment major?) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09* proc.c: add Binding#local_variable_get/set/defined?ko1
to access local variables which a binding contains. Most part of implementation by nobu. * test/ruby/test_proc.rb: add a tests for above. * vm.c, vm_core.h (rb_binding_add_dynavars): add a new function to add a new environment to create space for new local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06* vm_insnhelper.c (vm_push_frame): fix stack overflow check codes.ko1
Stack overflow check should be done *after* pushing a stack frame. However, some stack overflow checking codes checked *before* pushing a stack frame with iseq->stack_max. To solve this problem, add a new parameter `stack_max' to specify a possible consuming stack size. * vm_core.h (CHECK_VM_STACK_OVERFLOW0): add to share the stack overflow checking code. * insns.def: catch up this change. * vm.c, vm_eval.c: ditto. * test/ruby/test_exception.rb: add a stack overflow test. This code is reported by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-02* vm.c (m_core_define_method, m_core_define_singleton_method): nowusa
the value of def-expr is the Symbol of the name of the method, not nil. ref. [ruby-dev:42151] [Feature #3753] * test/ruby/test_syntax.rb (TestSyntax#test_value_of_def): test for above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h (OBJ_WRITE): cast to (VALUE *) for secondko1
parameter `slot'. You don't need to write a cast (VALUE *) any more. * class.c, compile.c, hash.c, iseq.c, proc.c, re.c, variable.c, vm.c, vm_method.c: remove cast expressions for OBJ_WRITE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* include/ruby/ruby.h (struct rb_data_type_struct), gc.c: addko1
rb_data_type_struct::flags. Now, this flags is passed at T_DATA object creation. You can specify FL_WB_PROTECTED on this flag. * iseq.c: making non-shady iseq objects. * class.c, compile.c, proc.c, vm.c: add WB for iseq objects. * vm_core.h, iseq.h: constify fields to detect WB insertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* vm.c (kwmerge_i): add WB.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02fill rdocsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19fix typos. Patch by k_takata.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-17vm.c: narrow variable scopenobu
* vm.c (vm_exec): move escape_ep into exception block, since it is updated every time entering the block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15revert r40760nobu
* vm.c (vm_invoke_proc): revert r40760 partially, which causes timeout in test/ruby/test_thread.rb:test_stack_size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-15vm.c: suppress warningsnobu
* vm.c (vm_invoke_proc, vm_exec), vm_eval.c (rb_eval_cmd): add volatile to suppress -Wclobbered warnings by gcc 4.9.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02thread.c: id localsnobu
* thread.c (id_locals): use cached ID. * vm.c (ruby_thread_init): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01eval.c: use predefined IDsnobu
* eval.c (frame_func_id): use predefined IDs. * vm.c (rb_vm_control_frame_id_and_class): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01proc.c: use predefined IDsnobu
* defs/id.def (predefined): add "idProc". * proc.c (mnew, mproc, mlambda): use predefined IDs. * vm.c (Init_VM): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-30proc.c: frozen core methodsnobu
* proc.c (mproc, mlambda): use frozen core methods instead of plain global methods, so that methods cannot be overridden. [ruby-core:54687] [Bug #8345] * vm.c (Init_VM): define proc and lambda on the frozen core object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-29* vm.c (VM_EP_LEP): simplify infinite loop.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22load.c: loaded_features_index st_tablenobu
* load.c (rb_feature_p), vm_core.h (rb_vm_struct): turn loaded_features_index into st_table. patches by tmm1 (Aman Gupta) in [ruby-core:53251] and [ruby-core:53274] [Bug #8048] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-06prefix global symbolsnobu
* iseq.c (rb_insn_operand_intern): prefix global symbols. * numeric.c (ruby_num_interval_step_size): ditto. * vm_backtrace.c (rb_vm_backtrace_str_ary), (rb_vm_backtrace_location_ary, rb_vm_thread_backtrace), (rb_vm_thread_backtrace_locations): ditto. * vm_trace.c (rb_vm_trace_mark_event_hooks): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05class.c: check redefinitionnobu
* class.c (rb_prepend_module): check redefinition of built-in opimized methods. [ruby-dev:47124] [Bug #7983] * vm.c (rb_vm_check_redefinition_by_prepend): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c: Typo in overview for example of Thread#status returning falsezzak
Reported by Lee Jarvis git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c (Thread): fix typos in overvieweregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c (Thread): Typo in overview, swap setting and gettingzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27* vm.c (Thread): Documentation overview of Thread classzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16* vm.c (ENV_IN_HEAP_P): fix off-by-one error.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16* vm.c (rb_thread_mark): mark a working Proc of bmethodko1
(a method defined by define_method) even if the method was removed. We could not trace working Proc object which represents the body of bmethod if the method was removed (alias/undef/overridden). Simply, it was mark miss. This patch by Kazuki Tsujimoto. [Bug #7825] NOTE: We can brush up this marking because we do not need to mark `me' on each living control frame. We need to mark `me's only if `me' was free'ed. This is future work after Ruby 2.0.0. * test/ruby/test_method.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05* vm.c (rb_vm_stack_to_heap): call rb_vm_get_binding_creatable_next_cfpktsj
instead of rb_vm_get_ruby_level_next_cfp to prevent a segfault by calling Kernel#callcc. See r39067 for more details. [ruby-dev:46908] [ruby-trunk - Bug #7774] * test/ruby/test_settracefunc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-05* proc.c (rb_binding_new_with_cfp): permit to create binding objectko1
of IFUNC frame. When `rb_binding_new_with_cfp()' is called, VM finds out the first normal (has iseq) frame and create a binding object of this frame and create Env objects. `ep's of related frames are updated (`ep's point Env object managed spaces). However, `ep' of skipped IFUNC frame was not updated and old invalid `ep' was remained. It causes serious problems. To solve this issue, permit IFUNC to create binding. (Maybe there is no problem on it) [ruby-dev:46908] [ruby-trunk - Bug #7774] * test/ruby/test_settracefunc.rb: add a test. * vm.c (rb_vm_get_binding_creatable_next_cfp), vm_core.h: added. * vm_trace.c: fix to use `rb_vm_get_binding_creatable_next_cfp()'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29* vm_backtrace.c: fix issue of rb_debug_inspector_open().ko1
The order of making binding should be stack (frame) top to bottom. [Bug #7635] And also fix issue of collecting klass. Collecting klass is same as TracePoint#defined_class. (previous version, it returns T_ICLASS (internal objects). * test/-ext-/debug/test_debug.rb: add a test. * ext/-test-/debug/extconf.rb, init.c, inspector.c: ditto. * vm_backtrace.c: remove magic number and add enum CALLER_BINDING_*. * vm_backtrace.c, include/ruby/debug.h: add new C api (experimental) rb_debug_inspector_frame_self_get(). * vm.c, vm_core.h, vm_trace.c: move decl. of rb_vm_control_frame_id_and_class() and constify first parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09vm.c: initialize root_svarnobu
* vm.c (th_init, ruby_thread_init): initialize root_svar with Qnil, since lep_svar_place() expects uninitialized svar to be nil, not 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-28vm.c: suppress warningnobu
* vm.c (check_machine_stack_size): ifdef a variable which is unused on non-pthread platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e