aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2023-11-17 17:14:36 -0500
committerClyne Sullivan <clyne@bitgloo.com>2023-11-17 17:14:36 -0500
commit636b4bbc1d0dfe0d6df6fe3a6ea243806d39f44a (patch)
tree440bdd53fb7b8044e1b7841c1e56744d59634b18
parent9ac70bfc0ee49e70005ec7d15fa5003b05fd06df (diff)
disable compacted literals
-rw-r--r--libalee/parser.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/libalee/parser.cpp b/libalee/parser.cpp
index 11aba38..705fe67 100644
--- a/libalee/parser.cpp
+++ b/libalee/parser.cpp
@@ -124,17 +124,7 @@ LIBALEE_SECTION
void Parser::processLiteral(State& state, Cell value)
{
if (state.compiling()) {
- constexpr auto ins = CoreWords::token("_lit");
-
- // Literal compression: opcodes between WordCount and Begin are unused,
- // so we assign literals to them to save space. Opcode "WordCount"
- // pushes zero to the stack, "WordCount + 1" pushes a one, etc.
- const Cell maxlit = Dictionary::Begin - CoreWords::WordCount;
- if (value >= 0 && value < maxlit)
- value += CoreWords::WordCount;
- else
- state.dict.add(ins);
-
+ state.dict.add(CoreWords::token("_lit"));
state.dict.add(value);
} else {
state.push(value);