Navigation Menu

Skip to content

Commit

Permalink
Method to add a folded constant no longer needs to cheat epicly.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Mar 1, 2012
1 parent 8af0430 commit 7b5784b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Perl6/World.pm
Expand Up @@ -958,13 +958,11 @@ class Perl6::World is HLL::World {
$past;
}

# XXX This needs doing properly...though it'd be trivial if we had
# proper serialization.
# Adds the result of a constant folding operation to the SC and
# returns a reference to it.
method add_constant_folded_result($r) {
my $result := PAST::Op.new();
$result<has_compile_time_value> := 1;
$result<compile_time_value> := $r;
$result
self.add_object($r);
self.get_ref($r);
}

# Creates a meta-object for a package, adds it to the root objects and
Expand Down

0 comments on commit 7b5784b

Please sign in to comment.