From fe785783eba59c8f5064b40a9f12b14e692516c5 Mon Sep 17 00:00:00 2001 From: pmurias Date: Wed, 12 Jul 2017 11:32:57 +0200 Subject: [PATCH] [js] Merge role into class --- src/vm/js/Chunk.nqp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/vm/js/Chunk.nqp b/src/vm/js/Chunk.nqp index bd650c1ca9..9e016890d4 100644 --- a/src/vm/js/Chunk.nqp +++ b/src/vm/js/Chunk.nqp @@ -10,15 +10,7 @@ my $T_NONVAL := -2; # something that is not a nqp value my $T_ARGS := -3; # comma separated arguments to a js call my $T_ARGS_ARRAY := -4; # an array of arguments to a js call -role Joinable { - method join() { - my @strs := nqp::list_s(); - self.collect(@strs); - nqp::join('', @strs); - } -} - -class Chunk does Joinable { +class Chunk { has int $!type; # the js type of $!expr has str $!expr; # a javascript expression without side effects has $!node; # a QAST::Node that contains info for source maps @@ -58,6 +50,12 @@ class Chunk does Joinable { } } } + + method join() { + my @strs := nqp::list_s(); + self.collect(@strs); + nqp::join('', @strs); + } method with_source_map_info($hll-compiler) { my @parts;