Allow us to make other changes to the file and move the method
around without affecting this test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
One more use of create_sequence_node() in node_extended_grapheme_cluster
(several more to come).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
On 64-bit Linux, fstat() needs to fill out a 144 byte struct
while F_GETFL only needs to return 8 bytes.
Fwiw, F_GETFD requires an additional rcu_read_lock and bitmap
check; so it's obviously more expensive than F_GETFL on Linux.
Reduce stack usage of rb_update_max_fd from 184 to 24 bytes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* coroutine/win32/Context.asm: old ml version 9 needs CPU
directive before `.model` directive.
* win32/Makefile.sub: specify object directories to separate Win32
and Win64 targets. Win32 rule was overridden by Win64 rule and
just ignored.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Introduce a new preprocessor macro R_ERR to visually reduce repetitive code
checking for return values and going to the err: label at the end of the
function node_extended_grapheme_cluster().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
It was probably me, 7 years ago, in r33844, who started overly
quoting YAML strings. But now, this file grown up 50+ times from
6 lines to more than 300. It is more annoying than convenient to
quote everything to add backslashes here and there.
Just use quotes only when necessary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
nogvl_copy_file_range and nogvl_copy_stream_sendfile each
used 344 bytes of stack before this change. Now, they are
inlined into nogvl_copy_stream_func which only uses 200 bytes
of stack.
"struct stat" is 144 bytes on my 64-bit Linux.
Note: this doesn't affect GC (yet) since GVL is released;
but increases safety if called from deep machine stacks.
It will affect GC if Thread::Light is merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
There are only four patterns of the last two arguments to quantify_property_node().
By replacing the lower/upper arguments with a single char, we get more expressive
calls, the last argument directly corresponding to the quantifier that we want to
use (except for '2', which means exactly two).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
No point in having rb_intern lookup and cache a predefined ID
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Reduce the struct to 80 bytes (from 88) on amd64 to reduce
stack use.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In function node_extended_grapheme_cluster(), store and test
return value from create_sequence_node(). Never forget this!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In function node_extended_grapheme_cluster(),
move declaration up so that block encompasses all of the regular expression
creation that finally makes up the sequence. Having blocks like this will
be great because it directly shows the extent of code belonging to each
subexpression of the regular expression being created.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
We make sure that the newly created tree and all remaining nodes passed in
in the node_array are freed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misc/ruby-style.el (ruby-style-c-mode): set ruby-style if the
remote repository is ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-local variable to global variable.
Consider this case:
1. MJIT worker: dequeue ISeq (stop_worker_p was still FALSE)
2. Ruby thread: call Kernel#exec, which calls mjit_finish(FALSE),
sets `stop_worker_p = TRUE`, and fires RUBY_VM_CHECK_INTS() once
3. MJIT worker: register copy job, but found stop_worker_p is TRUE.
set `worker_stopped = TRUE` and the thread stops.
4. Function-local job variable expires by the thread stop (this is eliminated by this commit)
5. Ruby thread: find `worker_stopped` becamse TRUE, start Kernel#exec.
Kernel#exec fails but exception is rescued.
6. Ruby thread: call RUBY_VM_CHECK_INTS. copy job is dispatched but job variable
is already expired.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The new function create_sequence_node() uses its second argument
(an array of Node*, from left to right, ending with NULL_NODE)
to create a sequence of expressions using node_new_list().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The new function quantify_property_node() combines the functions
create_property_node() and quantify_node(), which frequently appear together.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
GCC_FLAGS is not an array and CC is finally passed to configure as
single string. Pass CC via the environment variable, so it does
not need to be quoted anymore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The coverage counters is initialized with `counter[lineno - 1] = 0`,
but lineno may be 0, which led to write access for index -1.
[ruby-core:90085] [Bug#15346]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Similar to rb_typeddata_is_kind_of, except for that inherited type
is not an instance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e