summaryrefslogtreecommitdiff
path: root/prism_compile.c
AgeCommit message (Collapse)Author
2024-02-28[PRISM] Handle implicit flip-flop bounds checking against $.Kevin Newton
2024-02-28[PRISM] Only look up encoding once per fileKevin Newton
2024-02-28[PRISM] Do not load -r until we check if main script can be readKevin Newton
2024-02-22[PRISM] Integrate new number parsingKevin Newton
2024-02-21[PRISM] Support it local variableKevin Newton
2024-02-21[PRISM] Remove more dummy line usageKevin Newton
* or * optional parameter * parentheses * pre execution * post execution * range * rational * redo
2024-02-21[PRISM] Remove more dummy line usageKevin Newton
* if * unless
2024-02-21[PRISM] Remove more dummy line usageKevin Newton
* regular expressions * rescue * rescue modifier
2024-02-21[PRISM] Remove more dummy line usageKevin Newton
* returns * retry * self * singleton class
2024-02-21[PRISM] Remove more dummy line usageKevin Newton
* source files * source encodings * source lines
2024-02-21[PRISM] Remove more dummy line usageKevin Newton
* yields * xstrings * while * until * undef * true * symbol * super * string * statements * splat
2024-02-16[PRISM] GC guard stringsPeter Zhu
Using RSTRING_PTR can cause the string object to not exist on the stack, which could cause it to be GC'd or be moved by GC compaction. This can cause RSTRING_PTR to point to the incorrect location if the string is embedded and moved by GC compaction. Fixes ruby/prism#2442.
2024-02-14[PRISM] Correctly hook up line numbers for evalKevin Newton
2024-02-14[PRISM] Set eval encoding based on string encodingKevin Newton
2024-02-13[PRISM] yield is invalid inside evalMatt Valentine-House
2024-02-13[PRISM] Don't rb_bug if redo/break/next used during evalMatt Valentine-House
2024-02-13[PRISM] Replace assert with RUBY_ASSERTPeter Zhu
assert does not print the bug report, only the file and line number of the assertion that failed. RUBY_ASSERT prints the full bug report, which makes it much easier to debug.
2024-02-13[PRISM] Replace assert with rb_bugPeter Zhu
2024-02-13[PRISM] Refactors to use more locationsKevin Newton
2024-02-13[PRISM] Stop passing parser around so muchKevin Newton
2024-02-13[PRISM] Switch to locations for PM_ALIAS_GLOBAL_VARIABLE_NODE, ↵Kevin Newton
PM_ALIAS_METHOD_NODE, and PM_AND_NODE
2024-02-13[PRISM] Brace style in prism_compile.cKevin Newton
2024-02-13[PRISM] Fix lambda start column numberNikita Vasilevsky
Co-Authored-By: Kevin Newton <[email protected]>
2024-02-13[PRISM] Combine hash compilation between hashes and keywordsKevin Newton
2024-02-13[PRISM] Fix compilation of hash with multiple mergesKevin Newton
2024-02-12[PRISM] Check full lines for invalid UTF-8Kevin Newton
2024-02-11[PRISM] Fix error handling in `pm_parse_prism`eileencodes
Following changes made in ruby/prism#2365 this implements error handling for when `pm_string_mapped_init` returns `false`. Related: ruby/prism#2207
2024-02-09Split line_no and node_id before new_insn_bodyKevin Newton
Before this commit, there were many places where we had to generate dummy line nodes to hold both the line number and the node id that would then immediately get pulled out from the created node. Now we pass them explicitly so that we don't have to generate these nodes. This makes a clearer line between the parser and compiler, and also makes it easier to generate instructions when we don't have a specific node to tie them to. As such, it removes almost every single place where we needed to previously generate dummy nodes. This also makes it easier for the prism compiler, because now we can pass in line number and node id instead of trying to generate dummy nodes for every instruction that we compile.
2024-02-09[PRISM] Fix flaky memory in scope nodesKevin Newton
2024-02-09[PRISM] Implement opt_case_dispatchKevin Newton
2024-02-09[PRISM] Refactor case nodes for only one pass through whenKevin Newton
2024-02-08[PRISM] Compile constant paths with optimizationsKevin Newton
2024-02-08[PRISM] Compile constant reads using opt_getconstant_pathKevin Newton
2024-02-08[PRISM] Refactor call opts to only check for specific idsKevin Newton
2024-02-06[PRISM] Use block node location when building block iseqNikita Vasilevsky
Co-Authored-By: Kevin Newton <[email protected]>
2024-02-06[PRISM] Do not show source snippets if non-UTF-8Kevin Newton
2024-02-06[PRISM] Fix fsl coming from fileKevin Newton
2024-02-06[PRISM] Fix deconstruct index for postsKevin Newton
2024-02-06[PRISM] Set correct call target flagsKevin Newton
2024-02-06[PRISM] Handle match write poppedKevin Newton
2024-02-06[PRISM] Correctly handle popped attr writeKevin Newton
2024-02-06[PRISM] Handle empty interpolated statements at start of stringKevin Newton
2024-02-06[PRISM] Correct spec for defined? parenthesesKevin Newton
2024-02-05[PRISM] Raise ArgumentError for invalid encodingKevin Newton
2024-02-05[PRISM] Fix method return lineKevin Newton
2024-02-05[PRISM] Fix pattern matching array with implicit restKevin Newton
2024-02-05[PRISM] Fix up idUMinus optimizationKevin Newton
2024-02-05[PRISM] Fix encoding of interpolated stringsPeter Zhu
Fixes ruby/prism#2313.
2024-02-05[PRISM] Implement opt_aset_withJenny Shen
Part of ruby/prism#2231 Co-authored-by: Adrianna Chang <[email protected]> Co-authored-by: Peter Zhu <[email protected]>
2024-02-05[PRISM] Refactor PM_CALL_NODE conditionalJenny Shen
Co-authored-by: Peter Zhu <[email protected]>