Skip to content

Commit d048df5

Browse files
committed
Toss more dead code.
1 parent 660b25c commit d048df5

File tree

3 files changed

+2
-55
lines changed

3 files changed

+2
-55
lines changed

src/vm/jvm/QAST/Compiler.nqp

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,35 +2339,22 @@ class QAST::CompilerJAST {
23392339
has %!cuid_to_idx;
23402340
has @!jastmeth_names;
23412341
has @!cuids;
2342-
has @!names;
2343-
has @!lexical_name_lists;
2344-
has @!outer_mappings;
23452342
has @!callsites;
23462343
has %!callsite_map;
2347-
has @!handlers;
23482344

23492345
method BUILD() {
23502346
$!cur_idx := 0;
23512347
%!cuid_to_idx := {};
23522348
@!jastmeth_names := [];
23532349
@!cuids := [];
2354-
@!names := [];
2355-
@!lexical_name_lists := [];
2356-
@!outer_mappings := [];
23572350
@!callsites := [];
23582351
%!callsite_map := {};
2359-
@!handlers := [];
23602352
}
23612353

2362-
my $nolex := [[],[],[],[]];
2363-
my $noargs := [0,0,0,0];
2364-
method register_method($jastmeth, $cuid, $name, @handlers) {
2354+
method register_method($jastmeth, $cuid) {
23652355
%!cuid_to_idx{$cuid} := $!cur_idx;
23662356
nqp::push(@!jastmeth_names, $jastmeth.name);
23672357
nqp::push(@!cuids, $cuid);
2368-
nqp::push(@!names, $name);
2369-
nqp::push(@!lexical_name_lists, $nolex);
2370-
nqp::push(@!handlers, @handlers);
23712358
$!cur_idx := $!cur_idx + 1;
23722359
}
23732360

@@ -2381,15 +2368,6 @@ class QAST::CompilerJAST {
23812368
@!jastmeth_names[self.cuid_to_idx($cuid)]
23822369
}
23832370

2384-
method set_lexical_names($cuid, @ilex, @nlex, @slex, @olex) {
2385-
@!lexical_name_lists[self.cuid_to_idx($cuid)] := [@ilex, @nlex, @slex, @olex];
2386-
}
2387-
2388-
method set_outer($cuid, $outer_cuid) {
2389-
nqp::push(@!outer_mappings,
2390-
[self.cuid_to_idx($cuid), self.cuid_to_idx($outer_cuid)]);
2391-
}
2392-
23932371
method get_callsite_idx(@arg_types, @arg_names) {
23942372
my $key := join("-", @arg_types) ~ ';' ~ join("\0", @arg_names);
23952373
if nqp::existskey(%!callsite_map, $key) {
@@ -3033,12 +3011,11 @@ class QAST::CompilerJAST {
30333011
my $*JMETH := JAST::Method.new( :name(self.unique('qb_')), :returns('Void'), :static(0) );
30343012
$*JMETH.cr_name($node.name);
30353013
$*JMETH.cr_cuid($node.cuid);
3036-
$*CODEREFS.register_method($*JMETH, $node.cuid, $node.name, @handlers);
3014+
$*CODEREFS.register_method($*JMETH, $node.cuid);
30373015

30383016
# Set outer if we have one.
30393017
if nqp::istype($outer, BlockInfo) {
30403018
$*JMETH.cr_outer($outer.qast.cuid);
3041-
$*CODEREFS.set_outer($node.cuid, $outer.qast.cuid);
30423019
}
30433020

30443021
# Always take ThreadContext and callsite descriptor as arguments.
@@ -3063,7 +3040,6 @@ class QAST::CompilerJAST {
30633040

30643041
# Stash lexical names.
30653042
my @lex_names := $block.lexical_names_by_type();
3066-
$*CODEREFS.set_lexical_names($node.cuid, |@lex_names);
30673043
$*JMETH.cr_olex(@lex_names[$RT_OBJ]);
30683044
$*JMETH.cr_ilex(@lex_names[$RT_INT]);
30693045
$*JMETH.cr_nlex(@lex_names[$RT_NUM]);

src/vm/jvm/runtime/org/perl6/nqp/runtime/CodeRef.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,6 @@ public CodeRef(CompilationUnit compUnit, MethodHandle mh,
4646
handlers, this);
4747
}
4848

49-
/**
50-
* Sets up the code-ref data structure.
51-
*/
52-
public CodeRef(CompilationUnit compUnit, MethodHandle mh,
53-
String name, String uniqueId,
54-
String oLexicalNames, String iLexicalNames,
55-
String nLexicalNames, String sLexicalNames,
56-
long[][] handlers) {
57-
staticInfo = new StaticCodeInfo(compUnit, mh, name,uniqueId,
58-
oLexicalNames == null ? null : oLexicalNames.split("\\x00"),
59-
iLexicalNames == null ? null : iLexicalNames.split("\\x00"),
60-
nLexicalNames == null ? null : nLexicalNames.split("\\x00"),
61-
sLexicalNames == null ? null : sLexicalNames.split("\\x00"),
62-
handlers, this);
63-
}
64-
6549
/**
6650
* Clones the object.
6751
*/

src/vm/jvm/runtime/org/perl6/nqp/runtime/CompilationUnit.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,6 @@ public CodeRef lookupCodeRef(String uniqueId) {
174174
return cuidToCodeRef.get(uniqueId);
175175
}
176176

177-
/**
178-
* Installs a static lexical value.
179-
* XXX Legacy, can go after re-bootstrap.
180-
*/
181-
public SixModelObject setStaticLex(SixModelObject value, String name, String uniqueId) {
182-
CodeRef cr = cuidToCodeRef.get(uniqueId);
183-
Integer idx = cr.staticInfo.oTryGetLexicalIdx(name);
184-
if (idx == null)
185-
new RuntimeException("Invalid lexical name '" + name + "' in static lexical installation");
186-
cr.staticInfo.oLexStatic[idx] = value;
187-
return value;
188-
}
189-
190177
/**
191178
* Parses a bunch of info on static lexical values for a block and
192179
* installs each of them. TODO: lazify so we don't do it for blocks we

0 commit comments

Comments
 (0)