Permalink
Browse files

Fixed some of the compilation errors.

There are still failures due to SymbolTable.nqp module becoming a class
somehow, which produces an error about undeclared self. Needs further
investigation.
  • Loading branch information...
1 parent dc68184 commit 29e3d7e878d3070b2119996b385fd9397de79211 @tadzik committed Feb 17, 2011
View
@@ -33,7 +33,7 @@ RM_RF := @rm_rf@
POD2MAN := pod2man
#IF(parrot_is_shared and not(cygwin or win32)):export LD_RUN_PATH := @blib_dir@:$(LD_RUN_PATH)
PARROT := $(BIN_DIR)/parrot@exe@
-PARROT_NQP := $(BIN_DIR)/parrot_nqp@exe@
+PARROT_NQP := $(BIN_DIR)/parrot-nqp@exe@
PBC_TO_EXE := $(BIN_DIR)/pbc_to_exe@exe@
STRIP_PIRA := grep -v '^.annotate'
#IF(darwin):
@@ -50,7 +50,6 @@ ACTIONS_PM := \
BUILTINS_PIR := \
src/builtins/grammar_utils.pir \
src/builtins/literals.pir \
- src/builtins/load_bytecode.pir \
src/builtins/optable.pir \
src/builtins/say.pir \
src/builtins/strings.pir
@@ -468,4 +467,4 @@ TEST_LIBS := \
src/Testcase.pir
tvalues: $(TEST_LIBS) t/Slam/Values.pir src/Slam/Value.pir
- $(PARROT) $(PARROT_ARGS) t/Slam/Values.pir
+ $(PARROT) $(PARROT_ARGS) t/Slam/Values.pir
@@ -6,12 +6,12 @@ module Slam::Adverb {
################################################################
-=sub _onload
+=begin sub _onload
This code runs at initload, and explicitly creates this class as a subclass of
Slam::Val.
-=cut
+=end sub
_ONLOAD();
@@ -30,10 +30,10 @@ sub dump_stack() {
}
sub get_FILES() {
- NOTE("Getting open file info from $?FILES");
+ NOTE("Getting open file info from $*FILES");
my $filename := Q:PIR {
- %r = find_dynamic_lex '$?FILES'
+ %r = find_dynamic_lex '$*FILES'
};
my $info := Array::new($filename);
@@ -188,12 +188,12 @@ sub push($filename) {
sub set_FILES($value) {
Q:PIR {
- $P0 = find_dynamic_lex '$?FILES'
+ $P0 = find_dynamic_lex '$*FILES'
if null $P0 goto skip
$P0 = find_lex '$value'
$P1 = shift $P0
- store_dynamic_lex '$?FILES', $P1
+ store_dynamic_lex '$*FILES', $P1
$P1 = shift $P0
set_hll_global '$!ws', $P1
@@ -6,12 +6,12 @@ module Slam::Literal {
################################################################
-=sub _onload
+=begin sub _onload
This code runs at initload, and explicitly creates this class as a subclass of
Node.
-=cut
+=end sub
_ONLOAD();
@@ -35,7 +35,7 @@ sub get_search_list_of($qualified_identifier) {
return @search_list;
}
-=sub Slam::Node[] lookup_qualified_identifier($ident)
+=begin sub Slam::Node[] lookup_qualified_identifier($ident)
Given a qualified identifier -- a name that may or may not be prefixed with type
or namespace names -- looks up the possible matches for the identifier using the
@@ -47,7 +47,7 @@ not share a namespace, any path, no matter how explicit, can potentially resolve
to both a namespace and a symbol. (Perl6 uses this to create a proto-object with
the same name as the namespace.)
-=cut
+=end sub
sub query_relative_scopes_matching_path($root, @path) {
NOTE("Querying scopes relative to ", $root.name(), " that match path ", @path.join('::'));
@@ -6,11 +6,11 @@ module Slam::SymbolTable;
################################################################
-=sub _onload
+=begin sub _onload
This code runs at initload time, creating subclasses.
-=cut
+=end sub
_ONLOAD();
@@ -249,7 +249,7 @@ method stack(*@value) { self._ATTR('stack', @value); }
sub current_file() {
my $filename := Q:PIR {
- %r = find_dynamic_lex '$?FILES'
+ %r = find_dynamic_lex '$*FILES'
};
return $filename;
@@ -47,12 +47,12 @@ method is_namespace() { return 0; }
method is_rooted(*@value) { self._ATTR('is_rooted', @value); }
method parts(*@value) { return 'parts'; }
-=method path
+=begin method path
Returns an array containing the hll and namespace elements, for use by the
namespace functions.
-=cut
+=end method
method path(*@value) {
my @path := Array::clone(self.namespace);
View
@@ -234,14 +234,14 @@ Thus: string s1, s2; s1 = s2; becomes:
Because rvalue and lvalue for basic types gets the same treatment.
-=cut
+=end notes
-=class Slam::Value
+=begin class Slam::Value
See L<t/Slam/Values.nqp> for documentation.
-=cut
+=end class
module Slam::Value {
@@ -263,16 +263,16 @@ sub _ONLOAD() {
NOTE("done");
}
-=method is_lvalue()
+=begin method is_lvalue()
Returns a boolean indicating whether this value can be used as an I<lvalue>.
This version always returns false. An lvalue-capable subclass may override this.
-=cut
+=end method
method is_lvalue() { return 0; }
-=method load()
+=begin method load()
Returns an array of ops that will cause the C<value()> to be correct. For
constants, this is generally nothing - value() will return an immediate value
@@ -281,20 +281,20 @@ may be necessary to fetch the value from storage. For expressions, it may be
necessary to compute the value. The steps returned by C<load()> must do
whatever is needed.
-=cut
+=end method
method load() { return Array::empty(); }
-=method value($value?)
+=begin method value($value?)
Returns, and may optionally set, the value of this node. A node's value is
either a literal usable directly in PIR, such as a quoted string or a number,
or it is a register name, like C<$P0> or C<foo>, that can be assigned.
C<value()> is always used in an I<rvalue> context.
-=cut
+=end method
method value(*@value) { self._ATTR('value', @value); }
-}
+}
@@ -20,11 +20,11 @@ method name() {
return $Visitor_name;
}
-=method visit($node)
+=begin method visit($node)
Delegates to SUPER.visit. This method should be copied unchanged into the new code.
-=cut
+=end method
method visit($node) {
my @results := $SUPER.visit(self, $node);
@@ -36,9 +36,11 @@ method visit($node) {
################################################################
+=begin pod
+
=head3 Declaration Collection Visitor
-=cut
+=end pod
our @Child_attribute_names := (
'type',
@@ -77,11 +79,11 @@ method _collect_declarations_function_definition($node) {
################################################################
-=sub collect_declarations($past)
+=begin sub collect_declarations($past)
Visit all symbol declarations and record them in the backing namespace blocks.
-=cut
+=end sub
sub collect_declarations($past) {
NOTE("Collecting declarations in PAST tree");
@@ -1,5 +1,7 @@
# $Id$
+=begin pod
+
=head1 PastCleanupVisitor
Transforms the PAST tree into a shape suitable for PAST->POST compilation. This
@@ -13,7 +15,7 @@ an array of bits to be encapsulated. If a node does not directly represent such
a bit, it should pass back the result array of its children, otherwise append
itself to the child results.
-=cut
+=end pod
class Slam::PastCleanupVisitor;
@@ -95,11 +97,11 @@ method name() {
return $Visitor_name;
}
-=method visit($node)
+=begin method visit($node)
Delegates to SUPER.visit. This method should be copied unchanged into the new code.
-=cut
+=end method
method visit($node) {
my @results;
@@ -119,12 +121,12 @@ method visit($node) {
return @results;
}
-=method visit_children($node)
+=begin method visit_children($node)
Delegates to SUPER.visit_children. This method should be copied unchanged into
the new code.
-=cut
+=end method
method visit_children($node) {
NOTEold("Visiting ", +@($node), " children of ", NODE_TYPE($node), " node: ", $node.name());
@@ -148,11 +150,11 @@ method visit_child_syms($node) {
################################################################
-=method _cleanup_past_UNKNOWN($node)
+=begin method _cleanup_past_UNKNOWN($node)
Does nothing at all with the node.
-=cut
+=end method
our @Child_attribute_names := (
'alias_for',
@@ -201,12 +203,12 @@ method _cleanup_past_UNKNOWN($node) {
################################################################
-=sub cleanup_past($past)
+=begin sub cleanup_past($past)
The entry point. In general, you create a new object of this class, and use it
to visit the PAST node that is passed from the compiler.
-=cut
+=end sub
sub cleanup_past($past) {
NOTEold("Cleaning up PAST tree");
@@ -1,10 +1,12 @@
# $Id$
+=begin pod
+
=head1 ScopeAssignmentVisitor
Sets identifier scopes in PAST.
-=cut
+=end pod
class Slam::ScopeAssignmentVisitor;
@@ -62,11 +64,11 @@ method name() {
return $Visitor_name;
}
-=method visit($node)
+=begin method visit($node)
Delegates to SUPER.visit. This method should be copied unchanged into the new code.
-=cut
+=end method
method visit($node) {
my @results := $SUPER.visit(self, $node);
@@ -79,7 +81,7 @@ method visit($node) {
################################################################
-=method _assign_scope_UNKNOWN($node)
+=begin method _assign_scope_UNKNOWN($node)
This method -- starting with the prefix returned by C<get_method_prefix()>,
above, and ending with 'UNKNOWN', is the default method invoked by
@@ -102,7 +104,7 @@ indent them, etc.
Figure out your own approach.
-=cut
+=end method
our @Child_attribute_names := (
'alias_for',
@@ -187,12 +189,12 @@ method _assign_scope_qualified_identifier($node) {
################################################################
-=sub assign_scopes($past)
+=begin sub assign_scopes($past)
The entry point. In general, you create a new object of this class, and use it
to visit the PAST node that is passed from the compiler.
-=cut
+=end sub
sub assign_scopes($past) {
NOTEold("Assigning scopes in PAST tree");
Oops, something went wrong.

0 comments on commit 29e3d7e

Please sign in to comment.