summaryrefslogtreecommitdiff
path: root/prism_compile.c
AgeCommit message (Collapse)Author
2023-10-30More accurate functions documentationMatt Valentine-House
2023-10-26Integrate new prism multi target namesKevin Newton
2023-10-26[PRISM] Implement regex encoding flagseileencodes
Added the correct encoding to the allocated regex. This required making a new method to set the encoding and pass that to `rb_enc_reg_new` instead of `rb_reg_new`. The former `rb_reg_new` would set the encoding to ASCII8BIT regardless of encoding flag.
2023-10-26[PRISM] Cleanup macro usage for common ADD_INSNJemma Issroff
2023-10-26teach prism define to compile basic typesHParker
2023-10-26[PRISM] Implement compilation for ConstantPathAndWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for ConstantPathOrWriteNodeJemma Issroff
2023-10-26[PRISM] Implemented ConstantPathOperatorWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for CaseNodeJemma Issroff
2023-10-26[PRISM] Implement CallOperatorWriteNodeJemma Issroff
2023-10-26[PRISM] Implement compilation for CallOrWriteNodeJemma Issroff
2023-10-26[PRISM] Extract helper to use for CallOrWriteNodeJemma Issroff
2023-10-26[PRISM] Implemented compilation for CallAndWriteNodeJemma Issroff
2023-10-25[PRISM] ScopeNode doesn't need void * anymoreJemma Issroff
2023-10-25[PRISM] Move pm_scope_node_init to prism_compile.cJemma Issroff
pm_scope_node_init is only used for CRuby, so should not live in the ruby/prism repo. We will merge the changes here first so they're not breaking, and will then remove from ruby/prism
2023-10-25[PRISM] Add PM_POP macro, cleanup missing macro usageJemma Issroff
2023-10-25[PRISM] Toggled accepts_no_kwarg to true on NoKeywordsParameterNodeJemma Issroff
2023-10-25[PRISM] Add tests for ParametersNodeJemma Issroff
2023-10-25[PRISM] Implement NoKeywordsParameterNodeJemma Issroff
2023-10-23[PRISM] Implement compilation for PreExecutionNodesJemma Issroff
2023-10-23[PRISM] Add PM_PUTNIL macroJemma Issroff
2023-10-23[PRISM] Fix AssocSplat nodeJemma Issroff
This commit emits the correct instructions for hashes which have both AssocSplat and Assoc nodes contained within them
2023-10-23[PRISM] Fix __LINE__ to be 1-indexed by defaultJemma Issroff
2023-10-23[PRISM] Fix compilation for IfNode, UnlessNodeJemma Issroff
This properly implements the branch condition for FlipFlopNodes on If / UnlessNodes, and also fixes the bug in UnlessNodes
2023-10-20[PRISM] Setup encodings in prism compilerJemma Issroff
2023-10-20[PRISM] Fixed StringConcatNode, uncommented testsJemma Issroff
2023-10-20[Bug #19966] [PRISM] Fix singleton method definitionNobuyoshi Nakada
2023-10-18Address PR commentsJemma Issroff
2023-10-18Fixed mistypingJemma Issroff
2023-10-18Remove pm_compile_context_t, move the context onto ScopeNodeJemma Issroff
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.
2023-10-16[PRISM] Compile AliasGlobalVariableNode (#8675)Jemma Issroff
2023-10-16[PRISM] Fix more bugs in the compiler (#8658)Jemma Issroff
* Fixed ConstantPathWriteNode * FIxed FlipFlopNode
2023-10-16[PRISM] prevent underflow on popped splatarray (#8657)Adam Hess
prevent underflow on popped splatarray This only emits the splat array node when not popped
2023-10-13[PRISM] Compile fixes (#8644)Jemma Issroff
* Fix compiling UndefNodes * Fix compiling super on ClassNode * Fix compile popped for ModuleNode * Add checks for NULL nodes * Only add newhash if not popped
2023-10-04[Prism] Fix IfNode and ElseNodeMatt Valentine-House
ElseNode looks to have been implemented at the same time as IfNode, but was resulting in a stack underflow error. The following is from the test code ``` if foo bar end ``` ``` ❯ make run compiling compile.c linking miniruby ./miniruby -I./lib -I. -I.ext/common -r./arm64-darwin22-fake ./test.rb CRUBY: ************************************************** == disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(2,19)> 0000 putself ( 2)[Li] 0001 opt_send_without_block <calldata!mid:foo, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0003 branchunless 9 0005 putself 0006 opt_send_without_block <calldata!mid:bar, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0008 pop 0009 putobject_INT2FIX_1_ 0010 leave PRISM: ************************************************** -- raw disasm-------- 0000 putself ( 2) 0001 send <calldata:foo, 0>, nil ( 2) 0004 branchunless <L001> ( 2) 0006 jump <L000> ( 2) <L000> [sp: 0] * 0008 pop ( 1) 0009 putself ( 2) 0010 send <calldata:bar, 0>, nil ( 2) 0013 pop ( 2) 0014 jump <L002> ( 1) <L001> [sp: 0] <L002> [sp: -1] 0016 putobject 1 ( 2) 0018 leave ( 1) --------------------- <compiled>: <compiled>:1: argument stack underflow (-1) (SyntaxError) make: *** [run] Error 1 ``` This commit fixes the stack underflow error for both IfNode and ElseNode and introduces tests for them.
2023-10-02Adopt prism CallNode#name changesBenoit Daloze
2023-09-29Move more things through pm_static_literal_valueKevin Newton
2023-09-29Handle static array nodesKevin Newton
2023-09-29Compile implicit nodesKevin Newton
2023-09-29Fix up static hash compilationKevin Newton
2023-09-28More documentation for pattern matching compilationKevin Newton
2023-09-28Support if and unless guards on patternsKevin Newton
2023-09-28Support local variable targeting in pattern matchingKevin Newton
2023-09-28Support the AlternationPatternNodeKevin Newton
2023-09-28Fill in other missing pattern matching expression typesKevin Newton
2023-09-28Compile basic pattern matching expressionsKevin Newton
2023-09-28Consolidate regexp options, interpolated match last lineKevin Newton
2023-09-29Fix up indentation [ci skip]Nobuyoshi Nakada
2023-09-28[YARP] Implement MatchWriteNodeMatt Valentine-House
2023-09-28Fix up indentation in prism_compile.cKevin Newton