Skip to content

Commit

Permalink
[truffle] Remove a bunch of debugging print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Sep 24, 2018
1 parent 09448ff commit 76652d2
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 23 deletions.
1 change: 0 additions & 1 deletion src/vm/jvm/Truffle.nqp
Expand Up @@ -1073,7 +1073,6 @@ class QAST::TruffleCompiler does SerializeOnce {

if $node.scope eq 'lexical' && self.is_dynamic_var($node) {
if $node.decl eq 'var' {
nqp::say("declaring a dynamic variable");
# TODO avoid double binds
@*DECLARATIONS.push(["dynamic-bind-direct", $node.name, ["null"]]);
}
Expand Down
1 change: 0 additions & 1 deletion src/vm/jvm/runtime/org/perl6/nqp/truffle/ManageScopes.java
Expand Up @@ -83,7 +83,6 @@ public static NQPNode createBlock(NQPScope scope, String cuid, NQPNode[] childre
FrameDescriptor frameDescriptor = ((NQPScopeWithFrame) scope).getFrameDescriptor();
RootNode rootNode = new NQPRootNode(null, frameDescriptor, new NQPBlockBodyNode(children));
NQPCodeRef code = new NQPCodeRef(rootNode, null);
System.out.println("adding cuids");
scope.addCuid(cuid, code);
return new NQPStaticBlockNode(code);
}
Expand Down
Expand Up @@ -47,23 +47,18 @@ public String executeStr(VirtualFrame frame) {
NQPList crList = (NQPList) crNode.execute(frame);
Object conflict = conflictNode.execute(frame);

System.out.println("deserializing");
ByteBuffer binaryBlob = Base64.decode(blob);


String[] sh = new String[shList.elems()];
for (int i = 0; i < shList.elems(); i++) {
sh[i] = shList.atposStr(i);
}

System.out.println("got code refs: " + crList.elems());

NQPCodeRef[] cr = new NQPCodeRef[crList.elems()];
for (int i = 0; i < crList.elems(); i++) {
cr[i] = (NQPCodeRef) crList.atpos(i);
}


SerializationReader sr = new SerializationReader(sc, sh, cr, binaryBlob, scs);
sr.deserialize();

Expand Down
Expand Up @@ -33,12 +33,9 @@ public static NQPLoadbytecodeNode deserialize(NQPScope scope, NQPNode argNode) {
public String executeStr(VirtualFrame frame) {
String fileName = argNode.executeStr(frame);

System.out.println("loadbytecode " + fileName);

File file = new File(fileName);
if (!file.exists() && fileName.equals("ModuleLoader.truffle6")) {
/* We special case the initial ModuleLoader loading. */
System.out.println("We have the initial ModuleLoader");
fileName = "gen/truffle/stage1/" + fileName;
}

Expand Down
Expand Up @@ -15,7 +15,6 @@ public DynamicContext(DynamicContext outer) {
}

public Object lookup(String name) {
System.out.println("looking up dynamic variable " + name);
if (contents.containsKey(name)) {
return contents.get(name);
} else {
Expand All @@ -34,18 +33,16 @@ public void bind(String name, Object value) {
if (outer != null) {
this.outer.bind(name, value);
} else {
System.out.println("Can't bind " + name);
throw new RuntimeException("Can't bind " + name);
}
}
System.out.println("binding dynamic variable " + name + " = " + value);
}

public void bindDirect(String name, Object value) {
contents.put(name, value);
}

public Object lookupDirect(String name) {
System.out.println("looking up dynamic variable direct: " + name);
return contents.get(name);
}
}
9 changes: 0 additions & 9 deletions src/vm/truffle/ModuleLoader.nqp
Expand Up @@ -34,7 +34,6 @@ knowhow ModuleLoader {
}

method ctxsave($ctx) {
nqp::say('in ctxsave');
$*MAIN_CTX := $ctx;
$*CTXSAVE := 0;
}
Expand All @@ -61,8 +60,6 @@ knowhow ModuleLoader {
}
}

nqp::say("we have path: $path");

if nqp::existskey(%modules_loaded, $path) {
$module_ctx := %modules_loaded{$path};
}
Expand Down Expand Up @@ -165,18 +162,13 @@ knowhow ModuleLoader {
}

method load_setting($setting_name) {
nqp::say('here we loading setting');
my $setting;

if $setting_name ne 'NULL' {
# Add path prefix and .setting suffix.
my $path := "$setting_name.setting";
nqp::say('#1');
my @prefixes := self.search_path('setting-path');
nqp::say('#2');
for @prefixes -> $prefix {
nqp::say("checking $prefix");
nqp::say("trying out :" ~ "$prefix/$path.truffle6");
if nqp::stat("$prefix/$path.truffle6", 0) {
$path := "$prefix/$path.truffle6";
#last;
Expand All @@ -190,7 +182,6 @@ knowhow ModuleLoader {
#last;
}
}
nqp::say('#3');

# Unless we already did so, load the setting.
unless nqp::existskey(%settings_loaded, $path) {
Expand Down

0 comments on commit 76652d2

Please sign in to comment.