Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Eliminate callcontext cheat.

This in turn means PASTRegex - the library the remaining .pir cheats
were placed into - can now also go away. This means we have no .pir
files in the NQP repository, apart from the generated-from-NQP stage0.
  • Loading branch information...
commit c05f28169a967ce39574e519276074ffb2ec658b 1 parent 893a4d1
@jnthn jnthn authored
View
37 src/PASTRegex.pir
@@ -1,37 +0,0 @@
-.HLL 'parrot'
-.loadlib "nqp_group"
-.loadlib "nqp_ops"
-
-.sub '' :subid('PAST_Outer')
- # Save this as the main context.
- $P0 = find_dynamic_lex "$*CTXSAVE"
- if null $P0 goto ctxsave_done
- $I0 = can $P0, "ctxsave"
- unless $I0 goto ctxsave_done
- $P0."ctxsave"()
- ctxsave_done:
-
- # Set up our UNIT::GLOBALish.
- .local pmc KnowHOW, how
- KnowHOW = get_knowhow
- $P1 = KnowHOW."new_type"("name"=>"GLOBALish")
- how = get_how $P1
- how."compose"($P1)
- .lex 'GLOBALish', $P1
-
- # Capture inner block.
- .const 'Sub' $P5 = 'Imports'
- capture_lex $P5
-.end
-
-.sub '' :load :init :outer('PAST_Outer')
- # Run the main block.
- .const 'Sub' $P2 = 'PAST_Outer'
- $P2()
-.end
-
-.include 'src/cheats/parrot-callcontext.pir'
-
-.sub '' :anon :load :init :outer('PAST_Outer') :subid('Imports')
- load_bytecode 'dumper.pbc'
-.end
View
29 src/cheats/parrot-callcontext.pir
@@ -1,29 +0,0 @@
-# This adds to a Parrot PMC, so need to switch to that HLL for this
-# file.
-.HLL 'parrot'
-.namespace ['CallContext']
-.sub 'lexpad_full' :method
- .local pmc ctx, lexall, lexpad, lexpad_it
- ctx = self
- lexall = root_new ['parrot';'Hash']
-
- context_loop:
- if null ctx goto context_done
- lexpad = getattribute ctx, 'lex_pad'
- if null lexpad goto lexpad_done
- lexpad_it = iter lexpad
- lexpad_loop:
- unless lexpad_it goto lexpad_done
- $S0 = shift lexpad_it
- $I0 = exists lexall[$S0]
- if $I0 goto lexpad_loop
- $P0 = lexpad[$S0]
- lexall[$S0] = $P0
- goto lexpad_loop
- lexpad_done:
- ctx = getattribute ctx, 'outer_ctx'
- goto context_loop
- context_done:
- .return (lexall)
-.end
-.HLL 'nqp'
View
13 tools/build/Makefile.in
@@ -52,10 +52,6 @@ DYNEXT_DIR = dynext
PMC_DIR = src/pmc
OPS_DIR = src/ops
-PAST_SOURCES = \
- src/PASTRegex.pir \
- src/cheats/parrot-callcontext.pir \
-
HLL_SOURCES = \
src/HLL/Grammar.pm \
src/HLL/Actions.pm \
@@ -145,8 +141,6 @@ MODULE_LOADER_PBC = ModuleLoader.pbc
REGEX_PBC = NQPRegex.pbc
-PAST_PBC = PASTRegex.pbc
-
HLL_PBC = NQPHLL.pbc
HLL_COMBINED = gen/NQPHLL.pm
HLL_COMBINED_PIR = gen/NQPHLL.pir
@@ -492,7 +486,6 @@ CLEANUPS = \
*.manifest \
*.pdb \
$(REGEX_PBC) \
- $(PAST_PBC) \
$(HLL_PBC) \
$(P6REGEX_PBC) \
$(NQP_MO_PBC) \
@@ -536,7 +529,6 @@ all: $(NQP_EXE) $(P5QREGEX_PBC)
install: all
$(MKPATH) $(DESTDIR)$(PARROT_LIBRARY_DIR)
$(CP) $(MODULE_LOADER_PBC) $(DESTDIR)$(PARROT_LIBRARY_DIR)/$(MODULE_LOADER_PBC)
- $(CP) $(PAST_PBC) $(DESTDIR)$(PARROT_LIBRARY_DIR)/$(PAST_PBC)
$(MKPATH) $(DESTDIR)$(NQP_LANG_DIR)/lib
$(CP) $(QAST_PBC) $(DESTDIR)$(NQP_LANG_DIR)/lib/$(QAST_PBC)
$(CP) $(QASTNODE_PBC) $(DESTDIR)$(NQP_LANG_DIR)/lib/$(QASTNODE_PBC)
@@ -557,12 +549,9 @@ stage0: $(STAGE0)
stage1: $(STAGE1)
stage2: $(STAGE2)
-$(PAST_PBC): $(PAST_SOURCES) $(DYNEXT_TARGET)
- $(PARROT) -o $(PAST_PBC) $(PAST_SOURCES)
-
$(STAGE0): $(STAGE0_PBCS)
-$(STAGE0_PBCS): $(DYNEXT_TARGET) $(PAST_PBC) $(STAGE0_SOURCES)
+$(STAGE0_PBCS): $(DYNEXT_TARGET) $(STAGE0_SOURCES)
$(PARROT) -o $(STAGE0)/$(NQP_MO_PBC) src/stage0/NQPMO-s0.pir
$(PARROT) -o $(STAGE0)/$(MODULE_LOADER_PBC) src/stage0/ModuleLoader-s0.pir
$(PARROT) -o $(STAGE0)/$(CORE_SETTING_PBC) src/stage0/NQPCORE.setting-s0.pir
Please sign in to comment.
Something went wrong with that request. Please try again.