Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

… creation
  • Loading branch information...
commit 6a71d46fbe8ba4b2bb9b415b702985e6a7523a06 1 parent e653b7f
Tadeusz Sośnierz authored July 06, 2011

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  src/Perl6/SymbolTable.pm
8  src/Perl6/SymbolTable.pm
@@ -705,7 +705,13 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder {
705 705
     method add_constant($type, $primitive, *@value, *%named) {
706 706
         # If we already built this, find it in the cache and
707 707
         # just return that.
708  
-        my $cache_key := "$type,$primitive," ~ pir::join(',', @value);
  708
+        my $namedkey := '';
  709
+        for %named {
  710
+            $namedkey := $namedkey ~ $_.key ~ ',' ~ $_.value ~ ';';
  711
+        }
  712
+        my $cache_key := "$type,$primitive,"
  713
+                         ~ pir::join(',', @value)
  714
+                         ~ $namedkey;
709 715
         if pir::exists(%!const_cache, $cache_key) {
710 716
             my $past := self.get_slot_past_for_object(%!const_cache{$cache_key});
711 717
             $past<has_compile_time_value> := 1;

0 notes on commit 6a71d46

Please sign in to comment.
Something went wrong with that request. Please try again.