Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add .type to PAST::Var nodes. Also twiddle the build a bit to make su…
…re we build changes to the PAST extensions.
  • Loading branch information
jnthn committed Apr 26, 2011
1 parent 509ee04 commit 1a79be7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1,729 deletions.
10 changes: 4 additions & 6 deletions build/Makefile.in
Expand Up @@ -60,6 +60,7 @@ PAST_SOURCES = \
src/PASTRegex.pir \
src/PAST/Regex.pir \
src/PAST/Compiler-Regex.pir \
src/PAST/SixModelPASTExtensions.pir \
src/cheats/parrot-callcontext.pir \

HLL_SOURCES = \
Expand Down Expand Up @@ -178,7 +179,6 @@ CLEANUPS = \
$(PAST_PBC) \
$(HLL_PBC) \
$(P6REGEX_PBC) \
$(PAST_PBC) \
$(NQP_MO_PBC) \
$(CORE_SETTING_PBC) \
$(MODULE_LOADER_PBC) \
Expand Down Expand Up @@ -236,9 +236,8 @@ $(PAST_PBC): $(PAST_SOURCES)

$(STAGE0): $(STAGE0_PBCS)

$(STAGE0_PBCS): $(DYNEXT_TARGET) $(STAGE0_SOURCES)
$(STAGE0_PBCS): $(DYNEXT_TARGET) $(PAST_PBC) $(STAGE0_SOURCES)
$(PARROT) -o $(STAGE0)/$(REGEX_PBC) src/stage0/Regex-s0.pir
$(PARROT) -o $(PAST_PBC) src/stage0/PASTRegex-s0.pir
$(PARROT) -o $(STAGE0)/$(HLL_PBC) src/stage0/HLL-s0.pir
$(PARROT) -o $(STAGE0)/$(P6REGEX_PBC) src/stage0/P6Regex-s0.pir
$(PARROT) -o $(STAGE0)/$(NQP_MO_PBC) src/stage0/NQPMO-s0.pir
Expand Down Expand Up @@ -272,7 +271,7 @@ $(STAGE1)/$(CORE_SETTING_PBC): $(STAGE0_PBCS) $(STAGE1)/$(NQP_MO_PBC) $(STAGE1)/
--module-path=$(STAGE1) --setting=NULL $(STAGE1)/$(CORE_SETTING_NQP)
$(PARROT) -o $(STAGE1)/$(CORE_SETTING_PBC) $(STAGE1)/$(CORE_SETTING_PIR)

$(STAGE1)/$(REGEX_PBC): $(DYNEXT_TARGET) $(PAST_PBC) $(REGEX_SOURCES) $(STAGE1)/$(CORE_SETTING_PBC)
$(STAGE1)/$(REGEX_PBC): $(DYNEXT_TARGET) $(REGEX_SOURCES) $(STAGE1)/$(CORE_SETTING_PBC)
$(PARROT) -o $(STAGE1)/$(REGEX_PBC) $(REGEX_SOURCES)

$(STAGE1)/$(HLL_PBC): $(STAGE0_PBCS) $(STAGE1)/$(REGEX_PBC) $(STAGE1)/$(CORE_SETTING_PBC) $(HLL_SOURCES)
Expand Down Expand Up @@ -328,7 +327,7 @@ $(STAGE2)/$(CORE_SETTING_PBC): $(STAGE1_PBCS) $(STAGE2)/$(NQP_MO_PBC) $(STAGE2)/
--module-path=$(STAGE2) --setting=NULL $(STAGE2)/$(CORE_SETTING_NQP)
$(PARROT) -o $(STAGE2)/$(CORE_SETTING_PBC) $(STAGE2)/$(CORE_SETTING_PIR)

$(STAGE2)/$(REGEX_PBC): $(DYNEXT_TARGET) $(PAST_PBC) $(REGEX_SOURCES) $(STAGE2)/$(CORE_SETTING_PBC)
$(STAGE2)/$(REGEX_PBC): $(DYNEXT_TARGET) $(REGEX_SOURCES) $(STAGE2)/$(CORE_SETTING_PBC)
$(PARROT) -o $(STAGE2)/$(REGEX_PBC) $(REGEX_SOURCES)

$(STAGE2)/$(HLL_PBC): $(STAGE1_PBCS) $(STAGE2)/$(REGEX_PBC) $(STAGE2)/$(CORE_SETTING_PBC) $(HLL_SOURCES)
Expand Down Expand Up @@ -402,7 +401,6 @@ $(OPS_DIR)/$(OPS)$(LOAD_EXT): $(OPS_DIR)/$(OPS_SOURCE) $(DYNPMC)

bootstrap-files: $(STAGE2_PBCS) src/stage2/$(CORE_SETTING_NQP)
$(PERL) build/gen_bootstrap.pl src/Regex.pir >src/stage0/Regex-s0.pir
$(PERL) build/gen_bootstrap.pl src/PASTRegex.pir >src/stage0/PASTRegex-s0.pir
$(PERL) build/gen_bootstrap.pl src/stage2/$(HLL_COMBINED_PIR) >src/stage0/HLL-s0.pir
$(PERL) build/gen_bootstrap.pl src/stage2/$(NQP_COMBINED_PIR) >src/stage0/NQP-s0.pir
$(PERL) build/gen_bootstrap.pl src/stage2/$(CORE_SETTING_PIR) >src/stage0/NQPCORE.setting-s0.pir
Expand Down
17 changes: 17 additions & 0 deletions src/PAST/SixModelPASTExtensions.pir
@@ -0,0 +1,17 @@
# This file contains extensions to PAST for integration with 6model.

.namespace [ 'PAST';'Var' ]

=item type([value])

Accessor method -- sets/returns the type object for the type that this
will evaluate to. Note that this really is the type object itself, not
some PAST that will produce it or a name that it can be looked up by.

=cut

.sub 'type' :method
.param pmc value :optional
.param int has_value :opt_flag
.tailcall self.'attr'('type', value, has_value)
.end
1 change: 1 addition & 0 deletions src/PASTRegex.pir
Expand Up @@ -2,4 +2,5 @@

.include 'src/PAST/Regex.pir'
.include 'src/PAST/Compiler-Regex.pir'
.include 'src/PAST/SixModelPASTExtensions.pir'
.include 'src/cheats/parrot-callcontext.pir'

0 comments on commit 1a79be7

Please sign in to comment.