Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[SymbolTable] Include the %named parameter signature in the cache key…

… creation
  • Loading branch information...
commit 6a71d46fbe8ba4b2bb9b415b702985e6a7523a06 1 parent e653b7f
@tadzik tadzik authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/Perl6/SymbolTable.pm
View
8 src/Perl6/SymbolTable.pm
@@ -705,7 +705,13 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder {
method add_constant($type, $primitive, *@value, *%named) {
# If we already built this, find it in the cache and
# just return that.
- my $cache_key := "$type,$primitive," ~ pir::join(',', @value);
+ my $namedkey := '';
+ for %named {
+ $namedkey := $namedkey ~ $_.key ~ ',' ~ $_.value ~ ';';
+ }
+ my $cache_key := "$type,$primitive,"
+ ~ pir::join(',', @value)
+ ~ $namedkey;
if pir::exists(%!const_cache, $cache_key) {
my $past := self.get_slot_past_for_object(%!const_cache{$cache_key});
$past<has_compile_time_value> := 1;
Please sign in to comment.
Something went wrong with that request. Please try again.