Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge commits from ruby/master into yjit_backend_ir #406

Merged
merged 45 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
bfa6a8d
Only allow procs created by Symbol#to_proc to call public methods
jeremyevans Aug 10, 2022
ff42e23
Revert "Add {Method,UnboundMethod}#{public?,private?,protected?}"
jeremyevans Jun 4, 2022
9fc401b
[ruby/rdoc] Treat text markup (italic, bold, monofont) as blocks (htt…
BurdetteLamar Aug 10, 2022
74d9574
Add `--enable-devel` configure option
nobu Aug 11, 2022
26054c7
Fix paths of exts.mk to clean
nobu Aug 11, 2022
0c9803b
The "gems" build directory was rename as ".bundle"
nobu Aug 11, 2022
32d1ce9
Fix race conditions when cleaning extensions
nobu Aug 11, 2022
cfb9624
Fix Array#[] with ArithmeticSequence with negative steps (#5739)
jeremyevans Aug 11, 2022
c361cf4
[ruby/rdoc] [DOC] Make example formats explicit and consistent (https…
BurdetteLamar Aug 11, 2022
49517b3
Fix inspect for unicode codepoint 0x85
jeremyevans Feb 26, 2021
a677aa0
* 2022-08-12 [ci skip]
matzbot Aug 11, 2022
8a3f401
[ruby/rdoc] Improvements to Text Markup examples (https://github.com/…
BurdetteLamar Aug 11, 2022
5e3e4bc
[ruby/rdoc] Mods to section Text Markup (https://github.com/ruby/rdoc…
BurdetteLamar Aug 11, 2022
d9f1b8b
[ruby/error_highlight] Add a note about the current limitation of Err…
mame Aug 12, 2022
04815ea
All extensions in bundled gems are built by build-ext now
nobu Aug 12, 2022
a3a6d2d
No bundled gems to be installed from gem now
nobu Aug 12, 2022
9a11d50
[DOC] Use `true`/`false` for `@retval`s which are `bool`
nobu Aug 12, 2022
a201cfd
Add missing `rb_enc_iscntrl`
nobu Aug 12, 2022
cd1a0b3
Stop defining `RUBY_ABI_VERSION` if released versions
nobu Jul 12, 2022
4165fd0
Add Numeric#ceildiv and Integer#ceildiv
kyanagi May 27, 2022
24e33b8
Remove Numeric#ceildiv
kyanagi Jul 21, 2022
803a072
Improve performance of Integer#ceildiv
kyanagi Jul 22, 2022
844a0ed
[Bug #18962] Do not read again once reached EOF
nobu Aug 11, 2022
b2205cd
Short-circuit `Process._fork`
nobu Jul 14, 2022
77fdb3a
Introduce with_warn_vsprintf macro
S-H-GAMELINKS Aug 9, 2022
b179926
Bundle unreleased debug
nobu Aug 12, 2022
e444455
Preserve each column positions in gems/bundled_gems
nobu Aug 12, 2022
3a6405d
Adjust columns in gems/bundled_gems [ci skip]
nobu Aug 12, 2022
fa65800
[ruby/rdoc] [DOC] Enhances text about escapes (https://github.com/rub…
BurdetteLamar Aug 13, 2022
f9382a3
* 2022-08-13 [ci skip]
matzbot Aug 13, 2022
d1d1c9b
Add a NEWS entry about Integer#ceildiv [ci skip]
kyanagi Aug 12, 2022
0617cba
[DOC] Add the link to [Feature #18809]
nobu Aug 13, 2022
a58a429
Silent configure does not output cached configurations
nobu Aug 13, 2022
a9abf60
* 2022-08-14 [ci skip]
matzbot Aug 14, 2022
cb12d7c
Update dependencies
nobu Aug 14, 2022
89aa09a
[ruby/rinda] Handle situations where IPv4 multicast is not available
jeremyevans Aug 6, 2021
cbcf2da
* 2022-08-15 [ci skip]
matzbot Aug 15, 2022
e77c839
[rubygems/rubygems] Fix Ruby platform incorrectly removed on `bundle …
deivid-rodriguez Aug 11, 2022
8d40ede
[ruby/date] [DOC] Enhanced intro for Date (https://github.com/ruby/da…
BurdetteLamar Aug 15, 2022
0264424
Add test for GC thrashing of young object creation
peterzhu2118 Aug 15, 2022
ee864be
Simplify around `USE_YJIT` macro (#6240)
nobu Aug 15, 2022
e34720d
* 2022-08-16 [ci skip]
matzbot Aug 15, 2022
4e66b3f
[ruby/rdoc] [DOC] Remove duplicated line in RDoc::MarkupReference
peterzhu2118 Aug 15, 2022
9aa3532
Merge commit '4e66b3f47b2ad0d6cca1f2227dd38fdf117c0d3c' into yjit_ir_…
maximecb Aug 16, 2022
0e74ffe
Allow aarch64 to build YJIT
k0kubun Aug 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ Note: We're only listing outstanding class updates.
empty, instead of returning the default value or
calling the default proc. [[Bug #16908]]

* Integer
* Integer#ceildiv has been added. [[Feature #18809]]

* Kernel
* Kernel#binding raises RuntimeError if called from a non-Ruby frame
(such as a method defined in C). [[Bug #18487]]
Expand Down Expand Up @@ -276,3 +279,4 @@ The following deprecated APIs are removed.
[Feature #18685]: https://bugs.ruby-lang.org/issues/18685
[Bug #18782]: https://bugs.ruby-lang.org/issues/18782
[Feature #18788]: https://bugs.ruby-lang.org/issues/18788
[Feature #18809]: https://bugs.ruby-lang.org/issues/18809
9 changes: 3 additions & 6 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13822,7 +13822,6 @@ signal.$(OBJEXT): $(CCAN_DIR)/check_type/check_type.h
signal.$(OBJEXT): $(CCAN_DIR)/container_of/container_of.h
signal.$(OBJEXT): $(CCAN_DIR)/list/list.h
signal.$(OBJEXT): $(CCAN_DIR)/str/str.h
signal.$(OBJEXT): $(hdrdir)/ruby.h
signal.$(OBJEXT): $(hdrdir)/ruby/ruby.h
signal.$(OBJEXT): $(top_srcdir)/internal/array.h
signal.$(OBJEXT): $(top_srcdir)/internal/compilers.h
Expand Down Expand Up @@ -14008,7 +14007,6 @@ signal.$(OBJEXT): {$(VPATH)}internal/warning_push.h
signal.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
signal.$(OBJEXT): {$(VPATH)}method.h
signal.$(OBJEXT): {$(VPATH)}missing.h
signal.$(OBJEXT): {$(VPATH)}mjit.h
signal.$(OBJEXT): {$(VPATH)}node.h
signal.$(OBJEXT): {$(VPATH)}onigmo.h
signal.$(OBJEXT): {$(VPATH)}oniguruma.h
Expand All @@ -14024,7 +14022,6 @@ signal.$(OBJEXT): {$(VPATH)}thread_native.h
signal.$(OBJEXT): {$(VPATH)}vm_core.h
signal.$(OBJEXT): {$(VPATH)}vm_debug.h
signal.$(OBJEXT): {$(VPATH)}vm_opts.h
signal.$(OBJEXT): {$(VPATH)}yjit.h
sprintf.$(OBJEXT): $(hdrdir)/ruby/ruby.h
sprintf.$(OBJEXT): $(top_srcdir)/internal/bignum.h
sprintf.$(OBJEXT): $(top_srcdir)/internal/bits.h
Expand Down Expand Up @@ -17593,16 +17590,14 @@ yjit.$(OBJEXT): $(top_srcdir)/internal/array.h
yjit.$(OBJEXT): $(top_srcdir)/internal/class.h
yjit.$(OBJEXT): $(top_srcdir)/internal/compile.h
yjit.$(OBJEXT): $(top_srcdir)/internal/compilers.h
yjit.$(OBJEXT): $(top_srcdir)/internal/fixnum.h
yjit.$(OBJEXT): $(top_srcdir)/internal/gc.h
yjit.$(OBJEXT): $(top_srcdir)/internal/hash.h
yjit.$(OBJEXT): $(top_srcdir)/internal/imemo.h
yjit.$(OBJEXT): $(top_srcdir)/internal/object.h
yjit.$(OBJEXT): $(top_srcdir)/internal/re.h
yjit.$(OBJEXT): $(top_srcdir)/internal/sanitizers.h
yjit.$(OBJEXT): $(top_srcdir)/internal/serial.h
yjit.$(OBJEXT): $(top_srcdir)/internal/static_assert.h
yjit.$(OBJEXT): $(top_srcdir)/internal/string.h
yjit.$(OBJEXT): $(top_srcdir)/internal/struct.h
yjit.$(OBJEXT): $(top_srcdir)/internal/variable.h
yjit.$(OBJEXT): $(top_srcdir)/internal/vm.h
yjit.$(OBJEXT): $(top_srcdir)/internal/warnings.h
Expand All @@ -17620,6 +17615,7 @@ yjit.$(OBJEXT): {$(VPATH)}backward/2/stdarg.h
yjit.$(OBJEXT): {$(VPATH)}builtin.h
yjit.$(OBJEXT): {$(VPATH)}config.h
yjit.$(OBJEXT): {$(VPATH)}constant.h
yjit.$(OBJEXT): {$(VPATH)}debug.h
yjit.$(OBJEXT): {$(VPATH)}debug_counter.h
yjit.$(OBJEXT): {$(VPATH)}defines.h
yjit.$(OBJEXT): {$(VPATH)}encoding.h
Expand Down Expand Up @@ -17798,6 +17794,7 @@ yjit.$(OBJEXT): {$(VPATH)}thread_native.h
yjit.$(OBJEXT): {$(VPATH)}vm_callinfo.h
yjit.$(OBJEXT): {$(VPATH)}vm_core.h
yjit.$(OBJEXT): {$(VPATH)}vm_debug.h
yjit.$(OBJEXT): {$(VPATH)}vm_insnhelper.h
yjit.$(OBJEXT): {$(VPATH)}vm_opts.h
yjit.$(OBJEXT): {$(VPATH)}vm_sync.h
yjit.$(OBJEXT): {$(VPATH)}yjit.c
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ AC_SUBST(GIT)
AC_SUBST(HAVE_GIT)

eval `sed -n -e ['s/^@%:@define RUBY_[A-Z_]*VERSION_\([A-Z][A-Z][A-Z_0-9]*\) \([0-9][0-9]*\)$/\1=\2/p'] \
-e ['s/^@%:@define \(RUBY_ABI_VERSION\) \([0-9][0-9]*\).*/\1=\2/p'] \
-e ['s/^@%:@define \(RUBY_PATCHLEVEL\) \(.*\)/\1=\2/p'] \
$srcdir/include/ruby/internal/abi.h \
$srcdir/include/ruby/version.h $srcdir/version.h`
for v in MAJOR MINOR TEENY; do
AS_IF([eval "test \"\$$v\" = ''"], [
Expand All @@ -100,6 +102,9 @@ AC_SUBST(MINOR)
AC_SUBST(TEENY)
AC_SUBST(RUBY_API_VERSION, '$(MAJOR).$(MINOR)')
AC_SUBST(RUBY_PROGRAM_VERSION, '$(MAJOR).$(MINOR).$(TEENY)')
AS_CASE([$RUBY_PATCHLEVEL], [-*], [
AC_DEFINE_UNQUOTED(RUBY_ABI_VERSION, [${RUBY_ABI_VERSION}])
], [RUBY_ABI_VERSION=])

AS_IF([test "$program_prefix" = NONE], [
program_prefix=
Expand Down Expand Up @@ -4118,6 +4123,7 @@ AS_CASE(["$ruby_version"],
AS_IF([test ${RUBY_LIB_VERSION_STYLE+set}], [
{
echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
echo '@%:@include "confdefs.h"'
echo '#define STRINGIZE(x) x'
test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0'
echo '#include "version.h"'
Expand Down
145 changes: 103 additions & 42 deletions doc/rdoc/markup_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
# - {Directive}[rdoc-ref:RDoc::MarkupReference@Directives]:
# various special directions for the rendering.
# - {Text Markup}[rdoc-ref:RDoc:MarkupReference@Text+Markup]:
# text to be rendered in italic, bold, or monofont.
# text to be rendered in a special way.
#
# About the blocks:
#
Expand Down Expand Up @@ -632,18 +632,24 @@
#
# ==== Text Markup
#
# Text markup is metatext that marks text as:
# Text markup is metatext that affects HTML rendering:
#
# - Italic.
# - Bold.
# - Monofont.
# - Typeface: italic, bold, monofont.
# - Character conversions: copyright, trademark, certain punctuation.
# - Links.
# - Escapes: marking text as "not markup."
#
# Text markup may contain only one type of nested block:
# ===== Typeface Markup
#
# - More text markup:
# Typeface markup can specify that text is to be rendered
# as italic, bold, or monofont.
#
# Typeface markup may contain only one type of nested block:
#
# - More typeface markup:
# italic, bold, monofont.
#
# ===== Italic
# ====== Italic
#
# Text may be marked as italic via HTML tag <tt><i></tt> or <tt><em></tt>.
#
Expand Down Expand Up @@ -698,7 +704,7 @@
#
# ====== _Italic_ in a Heading
#
# ===== Bold
# ====== Bold
#
# Text may be marked as bold via HTML tag <tt><b></tt>.
#
Expand Down Expand Up @@ -755,7 +761,7 @@
#
# ===== *Bold* in a Heading
#
# ===== Monofont
# ====== Monofont
#
# Text may be marked as monofont
# -- sometimes called 'typewriter font' --
Expand Down Expand Up @@ -814,37 +820,6 @@
#
# ====== +Monofont+ in a Heading
#
# ==== Escaping Text Markup
#
# Text markup can be escaped with a backslash, as in \<tt>, which was obtained
# with <tt>\\<tt></tt>. Except in verbatim sections and between \<tt> tags,
# to produce a backslash you have to double it unless it is followed by a
# space, tab or newline. Otherwise, the HTML formatter will discard it, as it
# is used to escape potential links:
#
# * The \ must be doubled if not followed by white space: \\.
# * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
# * This is a link to {ruby-lang}[https://www.ruby-lang.org].
# * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org].
# * This will not be linked to \RDoc::RDoc#document
#
# generates:
#
# * The \ must be doubled if not followed by white space: \\.
# * But not in \<tt> tags: in a Regexp, <tt>\S</tt> matches non-space.
# * This is a link to {ruby-lang}[https://www.ruby-lang.org]
# * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org]
# * This will not be linked to \RDoc::RDoc#document
#
# Inside \<tt> tags, more precisely, leading backslashes are removed only if
# followed by a markup character (<tt><*_+</tt>), a backslash, or a known link
# reference (a known class or method). So in the example above, the backslash
# of <tt>\S</tt> would be removed if there was a class or module named +S+ in
# the current context.
#
# This behavior is inherited from RDoc version 1, and has been kept for
# compatibility with existing RDoc documentation.
#
# ==== Character Conversions
#
# Certain combinations of characters may be converted to special characters;
Expand Down Expand Up @@ -891,7 +866,6 @@
#
# - On-page: <tt>::dummy_singleton_method</tt> links to ::dummy_singleton_method.
# - Off-page<tt>RDoc::TokenStream::to_html</tt> links to RDoc::TokenStream::to_html.
# to \RDoc::TokenStream::to_html.
#
# Note: Occasionally \RDoc is not linked to a method whose name
# has only special characters. Check whether the links you were expecting
Expand Down Expand Up @@ -1068,6 +1042,93 @@
#
# {rdoc-image:https://www.ruby-lang.org/images/[email protected]}[./Alias.html]
#
# === Escaping Text
#
# Text that would otherwise be interpreted as markup
# can be "escaped," so that it is not interpreted as markup;
# the escape character is the backslash (<tt>'\\'</tt>).
#
# In a verbatim text block or a code block,
# the escape character is always preserved:
#
# Example input:
#
# This is not verbatim text.
#
# This is verbatim text, with an escape character \.
#
# This is not a code block.
#
# def foo
# 'String with an escape character.'
# end
#
# Rendered HTML:
#
# >>>
# This is not verbatim text.
#
# This is verbatim text, with an escape character \.
#
# This is not a code block.
#
# def foo
# 'This is a code block with an escape character \.'
# end
#
# In typeface markup (italic, bold, or monofont),
# an escape character is preserved unless it is immediately
# followed by nested typeface markup.
#
# Example input:
#
# This list is about escapes; it contains:
#
# - <tt>Monofont text with unescaped nested _italic_</tt>.
# - <tt>Monofont text with escaped nested \_italic_</tt>.
# - <tt>Monofont text with an escape character \</tt>.
#
# Rendered HTML:
#
# >>>
# This list is about escapes; it contains:
#
# - <tt>Monofont text with unescaped nested _italic_</tt>.
# - <tt>Monofont text with escaped nested \_italic_</tt>.
# - <tt>Monofont text with an escape character \ </tt>.
#
# In other text-bearing blocks
# (paragraphs, block quotes, list items, headings):
#
# - A single escape character immediately followed by markup
# escapes the markup.
# - A single escape character followed by whitespace is preserved.
# - A single escape character anywhere else is ignored.
# - A double escape character is rendered as a single backslash.
#
# Example input:
#
# This list is about escapes; it contains:
#
# - An unescaped class name, RDoc, that will become a link.
# - An escaped class name, \RDoc, that will not become a link.
# - An escape character followed by whitespace \ .
# - An escape character \that is ignored.
# - A double escape character \\ that is rendered
# as a single backslash.
#
# Rendered HTML:
#
# >>>
# This list is about escapes; it contains:
#
# - An unescaped class name, RDoc, that will become a link.
# - An escaped class name, \RDoc, that will not become a link.
# - An escape character followed by whitespace \ .
# - An escape character \that is ignored.
# - A double escape character \\ that is rendered
# as a single backslash.
#
# == Documentation Derived from Ruby Code
#
# [Class]
Expand Down
49 changes: 22 additions & 27 deletions error.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,47 +357,42 @@ warn_vsprintf(rb_encoding *enc, const char *file, int line, const char *fmt, va_
return rb_str_cat2(str, "\n");
}

#define with_warn_vsprintf(file, line, fmt) \
VALUE str; \
va_list args; \
va_start(args, fmt); \
str = warn_vsprintf(NULL, file, line, fmt, args); \
va_end(args);

void
rb_compile_warn(const char *file, int line, const char *fmt, ...)
{
VALUE str;
va_list args;

if (NIL_P(ruby_verbose)) return;

va_start(args, fmt);
str = warn_vsprintf(NULL, file, line, fmt, args);
va_end(args);
rb_write_warning_str(str);
if (!NIL_P(ruby_verbose)) {
with_warn_vsprintf(file, line, fmt) {
rb_write_warning_str(str);
}
}
}

/* rb_compile_warning() reports only in verbose mode */
void
rb_compile_warning(const char *file, int line, const char *fmt, ...)
{
VALUE str;
va_list args;

if (!RTEST(ruby_verbose)) return;

va_start(args, fmt);
str = warn_vsprintf(NULL, file, line, fmt, args);
va_end(args);
rb_write_warning_str(str);
if (RTEST(ruby_verbose)) {
with_warn_vsprintf(file, line, fmt) {
rb_write_warning_str(str);
}
}
}

void
rb_category_compile_warn(rb_warning_category_t category, const char *file, int line, const char *fmt, ...)
{
VALUE str;
va_list args;

if (NIL_P(ruby_verbose)) return;

va_start(args, fmt);
str = warn_vsprintf(NULL, file, line, fmt, args);
va_end(args);
rb_warn_category(str, rb_warning_category_to_name(category));
if (!NIL_P(ruby_verbose)) {
with_warn_vsprintf(file, line, fmt) {
rb_warn_category(str, rb_warning_category_to_name(category));
}
}
}

RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
Expand Down
1 change: 1 addition & 0 deletions ext/-test-/abi/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# frozen_string_literal: false
return unless RUBY_PATCHLEVEL < 0
require_relative "../auto_ext.rb"
auto_ext(inc: true)
Loading