mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_exec.c (vm_exec_core): add an UNLIKELY() hint.
* vm_insnhelper.h (BASIC_OP_UNREDEFINED_P): add a LIKELY() hint. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d397604bf
commit
574027ba03
3 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun Sep 28 12:36:09 2008 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_exec.c (vm_exec_core): add an UNLIKELY() hint.
|
||||
|
||||
* vm_insnhelper.h (BASIC_OP_UNREDEFINED_P): add a LIKELY() hint.
|
||||
|
||||
Sun Sep 28 12:04:18 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* string.c (str_new): sets empty string to coderange 7bit.
|
||||
|
|
|
@ -83,7 +83,7 @@ vm_exec_core(rb_thread_t *th, VALUE initial)
|
|||
|
||||
#if OPT_TOKEN_THREADED_CODE || OPT_DIRECT_THREADED_CODE
|
||||
#include "vmtc.inc"
|
||||
if (th == 0) {
|
||||
if (UNLIKELY(th == 0)) {
|
||||
#if OPT_STACK_CACHING
|
||||
finish_insn_seq[0] = (VALUE)&&LABEL (finish_SC_ax_ax);
|
||||
#else
|
||||
|
|
|
@ -180,7 +180,7 @@ extern VALUE ruby_vm_redefined_flag;
|
|||
|
||||
/* optimize insn */
|
||||
#define FIXNUM_2_P(a, b) ((a) & (b) & 1)
|
||||
#define BASIC_OP_UNREDEFINED_P(op) ((ruby_vm_redefined_flag & (op)) == 0)
|
||||
#define BASIC_OP_UNREDEFINED_P(op) (LIKELY((ruby_vm_redefined_flag & (op)) == 0))
|
||||
#define HEAP_CLASS_OF(obj) RBASIC(obj)->klass
|
||||
|
||||
#define CALL_SIMPLE_METHOD(num, id, recv) do { \
|
||||
|
|
Loading…
Reference in a new issue