Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/Translator.java @ 13732:fbf448929260
Ruby: remove some prototyping code no longer needed
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Sat, 18 Jan 2014 22:12:42 -0800 |
parents | d7af2296cebb |
children | 2c1c805153e6 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/Translator.java Fri Jan 17 23:16:59 2014 +0100 +++ b/graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/Translator.java Sat Jan 18 22:12:42 2014 -0800 @@ -16,8 +16,6 @@ import com.oracle.truffle.api.*; import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.impl.*; -import com.oracle.truffle.api.nodes.instrument.*; -import com.oracle.truffle.api.nodes.instrument.InstrumentationProbeNode.ProbeChain; import com.oracle.truffle.ruby.nodes.*; import com.oracle.truffle.ruby.nodes.call.*; import com.oracle.truffle.ruby.nodes.cast.*; @@ -89,15 +87,6 @@ nodeDefinedNames.put(org.jrubyparser.ast.DVarNode.class, "local-variable"); } - private static final Set<String> debugIgnoredCalls = new HashSet<>(); - - static { - debugIgnoredCalls.add("downto"); - debugIgnoredCalls.add("each"); - debugIgnoredCalls.add("times"); - debugIgnoredCalls.add("upto"); - } - /** * Global variables which in common usage have frame local semantics. */ @@ -302,17 +291,6 @@ RubyNode translated = new CallNode(context, sourceSection, node.getName(), receiverTranslated, argumentsAndBlock.getBlock(), argumentsAndBlock.isSplatted(), argumentsAndBlock.getArguments()); - if (context.getConfiguration().getDebug()) { - final CallNode callNode = (CallNode) translated; - if (!debugIgnoredCalls.contains(callNode.getName())) { - - final RubyProxyNode proxy = new RubyProxyNode(context, translated); - proxy.markAs(NodePhylum.CALL); - proxy.getProbeChain().appendProbe(new RubyCallProbe(context, node.getName())); - translated = proxy; - } - } - return translated; } @@ -1162,21 +1140,6 @@ RubyNode translated = ((ReadNode) lhs).makeWriteNode(rhs); - if (context.getConfiguration().getDebug()) { - final UniqueMethodIdentifier methodIdentifier = environment.findMethodForLocalVar(node.getName()); - - RubyProxyNode proxy; - if (translated instanceof RubyProxyNode) { - proxy = (RubyProxyNode) translated; - } else { - proxy = new RubyProxyNode(context, translated); - } - proxy.markAs(NodePhylum.ASSIGNMENT); - context.getDebugManager().registerLocalDebugProxy(methodIdentifier, node.getName(), proxy.getProbeChain()); - - translated = proxy; - } - return translated; } @@ -1477,25 +1440,6 @@ public Object visitNewlineNode(org.jrubyparser.ast.NewlineNode node) { RubyNode translated = (RubyNode) node.getNextNode().accept(this); - if (context.getConfiguration().getDebug()) { - - RubyProxyNode proxy; - if (translated instanceof RubyProxyNode) { - proxy = (RubyProxyNode) translated; - if (proxy.getChild() instanceof CallNode) { - // Special case; replace proxy with one registered by line, merge in information - final CallNode callNode = (CallNode) proxy.getChild(); - final ProbeChain probeChain = proxy.getProbeChain(); - - proxy = new RubyProxyNode(context, callNode, probeChain); - } - } else { - proxy = new RubyProxyNode(context, translated); - } - proxy.markAs(NodePhylum.STATEMENT); - translated = proxy; - } - if (context.getConfiguration().getTrace()) { RubyProxyNode proxy; if (translated instanceof RubyProxyNode) {