зеркало из https://github.com/github/ruby.git
transform_mjit_header.rb: accept having attribute
between a type of return value and function identifier. Like: ``` rb_control_frame_t * __attribute__ ((__fastcall__)) rb_vm_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) { ... } ``` [Bug #14949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8bcf27527c
Коммит
d3f57771e0
|
@ -10,7 +10,11 @@ PROGRAM = File.basename($0, ".*")
|
|||
module MJITHeader
|
||||
ATTR_VALUE_REGEXP = /[^()]|\([^()]*\)/
|
||||
ATTR_REGEXP = /__attribute__\s*\(\(#{ATTR_VALUE_REGEXP}*\)\)/
|
||||
FUNC_HEADER_REGEXP = /\A(\s*#{ATTR_REGEXP})*[^\[{(]*\((#{ATTR_REGEXP}|[^()])*\)(\s*#{ATTR_REGEXP})*\s*/
|
||||
# Example:
|
||||
# VALUE foo(int bar)
|
||||
# VALUE __attribute__ ((foo)) bar(int baz)
|
||||
# __attribute__ ((foo)) VALUE bar(int baz)
|
||||
FUNC_HEADER_REGEXP = /\A((\s*#{ATTR_REGEXP})|[^\[{(])*\((#{ATTR_REGEXP}|[^()])*\)(\s*#{ATTR_REGEXP})*\s*/
|
||||
TARGET_NAME_REGEXP = /\A(rb|ruby|vm|insn|attr)_/
|
||||
|
||||
# Predefined macros for compilers which are already supported by MJIT.
|
||||
|
|
Загрузка…
Ссылка в новой задаче