summaryrefslogtreecommitdiff
path: root/prism_compile.c
AgeCommit message (Collapse)Author
2024-04-04[PRISM] Remove dummy_line_node usage from class variable nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from global variable nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from index nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from instance variable nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from keyword hash and lambda nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from local variable nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from match predicate nodeKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from match required nodeKevin Newton
2024-04-04[PRISM] Simplify match write node compilationKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage from module and match write nodeKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for multi write nodeKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for next nodeKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for call operator write nodeKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for call and/or write nodeKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for call nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for break nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for block argument nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for begin nodesKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage for PM_BACK_REFERENCE_READ_NODEKevin Newton
2024-04-04[PRISM] Remove dummy_line_node usage in pm_interpolated_node_compileKevin Newton
2024-04-03[PRISM] Mark constant path owning expressions as not poppedKevin Newton
2024-03-29[PRISM] Fix BEGIN{} execution orderKevin Newton
2024-03-28[PRISM] Add debug info for frozen stringsKevin Newton
2024-03-28[PRISM] Simplify raising load errorsKevin Newton
2024-03-28[PRISM] Use new -x prism APIKevin Newton
2024-03-27[PRISM] Set path on syntax errorKevin Newton
2024-03-27[PRISM] Implicitly change encoding when a UTF-8 BOM is foundKevin Newton
2024-03-27[PRISM] Match style for invalid encoding errorKevin Newton
2024-03-27[PRISM] Include file and line in error messageKevin Newton
2024-03-27[PRISM] Use new error formatting APIKevin Newton
2024-03-27[PRISM] Pass --enable-frozen-string-literal through to evalsKevin Newton
2024-03-27[PRISM] Fix ASCII-compatible check for eval encodingKevin Newton
2024-03-26[PRISM] Use correct encoding for regular expression literalsKevin Newton
2024-03-26[PRISM] Better handle interpolated* nodes with inner frozen partsKevin Newton
2024-03-19Implement chilled stringsÉtienne Barrié
[Feature #20205] As a path toward enabling frozen string literals by default in the future, this commit introduce "chilled strings". From a user perspective chilled strings pretend to be frozen, but on the first attempt to mutate them, they lose their frozen status and emit a warning rather than to raise a `FrozenError`. Implementation wise, `rb_compile_option_struct.frozen_string_literal` is no longer a boolean but a tri-state of `enabled/disabled/unset`. When code is compiled with frozen string literals neither explictly enabled or disabled, string literals are compiled with a new `putchilledstring` instruction. This instruction is identical to `putstring` except it marks the String with the `STR_CHILLED (FL_USER3)` and `FL_FREEZE` flags. Chilled strings have the `FL_FREEZE` flag as to minimize the need to check for chilled strings across the codebase, and to improve compatibility with C extensions. Notes: - `String#freeze`: clears the chilled flag. - `String#-@`: acts as if the string was mutable. - `String#+@`: acts as if the string was mutable. - `String#clone`: copies the chilled flag. Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
2024-03-18[PRISM] Fix up frozen checks for arefKevin Newton
2024-03-15Refactor frozen_string_literal check during compilationJean Boussier
In preparation for https://bugs.ruby-lang.org/issues/20205. The `frozen_string_literal` compilation option will no longer be a boolean but a tri-state: `on/off/default`.
2024-03-15[PRISM] Fix up source file when not frozenKevin Newton
2024-03-15Fix compiling shareable constant nodesKevin Newton
2024-03-14[PRISM] Fix float in case dispatchKevin Newton
2024-03-14Ensure test suite is compatible with --frozen-string-literalJean Boussier
As preparation for https://bugs.ruby-lang.org/issues/20205 making sure the test suite is compatible with frozen string literals is making things easier.
2024-03-13[PRISM] Handle ambiguous_param0 for it and numbered parametersKevin Newton
2024-03-13Handle nth ref too bigKevin Newton
2024-03-13[PRISM] Static literal strings should be fstringsKevin Newton
2024-03-13[PRISM] Fix compiling duplicated keywordsKevin Newton
2024-03-13[PRISM] Handle parentheses in patterns in prismKevin Newton
2024-03-11[PRISM] Parse stdin on CLI with prismKevin Newton
2024-03-07[PRISM] Use new integer logicKevin Newton
2024-03-05[DOC] fix some commentscui fliter
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-02-28[PRISM] Handle implicit flip-flop bounds checking against $.Kevin Newton