Age | Commit message (Collapse) | Author |
|
The operands in each instruction needs to be pinned because if
auto-compaction runs in iseq_set_sequence, then the objects could exist
on the generated_iseq buffer, which would not be reference updated which
can lead to T_MOVED (and subsequently T_NONE) objects on the iseq.
|
|
|
|
The function iseq_set_exception_table allocates memory which can cause
a GC compaction to run. Since catch_table_ary is not on the stack, it
can be moved, which would make tptr incorrect.
|
|
- Unless `sizeof(BDIGIT) == 4`, (8-byte integer not available), the
size to be loaded was wrong.
- Since `BDIGIT`s are dumped as raw binary, the loaded byte order was
inverted unless little-endian.
|
|
|
|
If we always return 0, we might as well not define
the function at all.
|
|
This saves some malloc churn for small pin lists.
|
|
Sort outer variables by names to make dumped binary data stable.
|
|
It depends on only `VALUE` definition. Check for endianness and word
size instead of the platform name.
|
|
|
|
|
|
Compilation now works for MultiWriteNodes and MultiTargetNodes, with
nesting on MultiWrites. See the tests added in this commit for example
behavior.
|
|
|
|
Fixes ruby/prism#1648
|
|
|
|
|
|
|
|
ARGSCAT has been used for nd_args to hold index and rvalue,
because there was limitation on the number of members for Node.
We can easily change structure of node now, let's expand it.
|
|
|
|
|
|
We changed ScopeNodes to point to their parent (previous) ScopeNodes.
Accordingly, we can remove pm_compile_context_t, and store all
necessary context in ScopeNodes, allowing us to access locals from
outer scopes.
|
|
It's an estimator for application size and could be used as a
compilation heuristic later.
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
Co-authored-by: Takashi Kokubun <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This node type was added for the multi-value experiment back in 2004.
The feature itself was removed after a few years, but this is its
remnant.
|
|
|
|
Co-authored-by: Nobuyoshi Nakada <[email protected]>
|
|
|
|
Tracks other callinfo that references the same kwargs and frees them when all references are cleared.
[bug #19906]
Co-authored-by: Peter Zhu <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All kind of AST nodes use same struct RNode, which has u1, u2, u3 union members
for holding different kind of data.
This has two problems.
1. Low flexibility of data structure
Some nodes, for example NODE_TRUE, don’t use u1, u2, u3. On the other hand,
NODE_OP_ASGN2 needs more than three union members. However they use same
structure definition, need to allocate three union members for NODE_TRUE and
need to separate NODE_OP_ASGN2 into another node.
This change removes the restriction so make it possible to
change data structure by each node type.
2. No compile time check for union member access
It’s developer’s responsibility for using correct member for each node type when it’s union.
This change clarifies which node has which type of fields and enables compile time check.
This commit also changes node_buffer_elem_struct buf management to handle
different size data with alignment.
|
|
|
|
|
|
It seems not-uncommon for methods to have no IV, ISE, or ICVARC caches.
Calling malloc with 0 will actually allocate something, so if there
aren't any caches (`ISEQ_IS_SIZE(body) == 0`), then we can avoid
allocating memory by not calling malloc. If there are no caches, then
theoretically nobody should be reading from the buffer anyway.
This saves about 1MB on Lobsters benchmark.
Notes:
Merged: https://github.com/ruby/ruby/pull/8442
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8381
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/8400
|
|
There's a missing write barrier for operands in the iseq instruction
list, which can cause crashes.
It can be reproduced when Ruby is compiled with `-DRUBY_DEBUG_ENV=1`.
Using the following command:
```
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0 RUBY_DEBUG=gc_stress ruby -w --disable=gems -Itool/lib -W0 test.rb
```
The following script crashes:
```
require "test/unit"
```
Notes:
Merged: https://github.com/ruby/ruby/pull/8385
|
|
This reverts commit 7e0f5df2f99693267d61636d23da47f79924e9d5.
https://bugs.ruby-lang.org/issues/19857#note-7
|
|
* Add failing test.
Notes:
Merged-By: ioquatix <[email protected]>
|
|
|
|
* Add a compile_context arg to yp_compile_node
The compile_context will allow us to pass around the parser, and
the constants and lookup table (to be used in future commits).
* Compile yp_program_node_t and yp_statements_node_t
Add the compilation for program and statements node so that we can
successfully compile an empty program with YARP.
* Helper functions for parsing numbers, strings, and symbols
* Compile basic numeric / boolean node types in YARP
* Compile StringNode and SymbolNodes in YARP
* Compile several basic node types in YARP
* Added error return for missing node
Notes:
Merged-By: jemmaissroff
|