# HG changeset patch # User Michael Van De Vanter # Date 1391541429 28800 # Node ID cf16ff2dba6906234eafa7d152ee1c7e39526c5e # Parent 3f27e57439eddd97841e8d0ddfbaac11442129e2 Ruby/Instrumentation: class rename diff -r 3f27e57439ed -r cf16ff2dba69 graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/MinimalRubyDebugContext.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/MinimalRubyDebugContext.java Tue Feb 04 11:17:09 2014 -0800 @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. This + * code is released under a tri EPL/GPL/LGPL license. You can use it, + * redistribute it and/or modify it under the terms of the: + * + * Eclipse Public License version 1.0 + * GNU General Public License version 2 + * GNU Lesser General Public License version 2.1 + */ +package com.oracle.truffle.ruby.parser; + +import com.oracle.truffle.api.debug.*; +import com.oracle.truffle.api.frame.*; +import com.oracle.truffle.api.nodes.*; +import com.oracle.truffle.ruby.nodes.instrument.*; +import com.oracle.truffle.ruby.runtime.*; + +/** + * Minimum possible debugging support for Ruby implementation. Some facilities are needed to support + * the Ruby trace mechanism. + */ +public final class MinimalRubyDebugContext implements DebugContext { + + private final RubyContext executionContext; + private final RubyNodeInstrumenter instrumenter; + private final DebugManager debugManager; + + public MinimalRubyDebugContext(RubyContext context) { + this.executionContext = context; + this.instrumenter = new DefaultRubyNodeInstrumenter(); + this.debugManager = new DefaultDebugManager(context); + } + + public RubyContext getContext() { + return executionContext; + } + + public RubyNodeInstrumenter getNodeInstrumenter() { + return instrumenter; + } + + public DebugManager getDebugManager() { + return debugManager; + } + + public RubyASTPrinter getASTPrinter() { + return null; + } + + public String displayValue(Object value) { + return value.toString(); + } + + public String displayIdentifier(FrameSlot slot) { + return slot.getIdentifier().toString(); + } + + public void executionHalted(Node node, VirtualFrame frame) { + assert false; + } + +} diff -r 3f27e57439ed -r cf16ff2dba69 graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/MinimumRubyDebugContext.java --- a/graal/com.oracle.truffle.ruby.parser/src/com/oracle/truffle/ruby/parser/MinimumRubyDebugContext.java Mon Feb 03 20:58:23 2014 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. This - * code is released under a tri EPL/GPL/LGPL license. You can use it, - * redistribute it and/or modify it under the terms of the: - * - * Eclipse Public License version 1.0 - * GNU General Public License version 2 - * GNU Lesser General Public License version 2.1 - */ -package com.oracle.truffle.ruby.parser; - -import com.oracle.truffle.api.debug.*; -import com.oracle.truffle.api.frame.*; -import com.oracle.truffle.api.nodes.*; -import com.oracle.truffle.ruby.nodes.instrument.*; -import com.oracle.truffle.ruby.runtime.*; - -/** - * Minimum possible debugging support for Ruby implementation. Some facilities are needed to support - * the Ruby trace mechanism. - */ -public final class MinimumRubyDebugContext implements DebugContext { - - private final RubyContext executionContext; - private final RubyNodeInstrumenter instrumenter; - private final DebugManager debugManager; - - public MinimumRubyDebugContext(RubyContext context) { - this.executionContext = context; - this.instrumenter = new DefaultRubyNodeInstrumenter(); - this.debugManager = new DefaultDebugManager(context); - } - - public RubyContext getContext() { - return executionContext; - } - - public RubyNodeInstrumenter getNodeInstrumenter() { - return instrumenter; - } - - public DebugManager getDebugManager() { - return debugManager; - } - - public RubyASTPrinter getASTPrinter() { - return null; - } - - public String displayValue(Object value) { - return value.toString(); - } - - public String displayIdentifier(FrameSlot slot) { - return slot.getIdentifier().toString(); - } - - public void executionHalted(Node node, VirtualFrame frame) { - assert false; - } - -} diff -r 3f27e57439ed -r cf16ff2dba69 graal/com.oracle.truffle.ruby.shell/src/com/oracle/truffle/ruby/shell/Shell.java --- a/graal/com.oracle.truffle.ruby.shell/src/com/oracle/truffle/ruby/shell/Shell.java Mon Feb 03 20:58:23 2014 -0800 +++ b/graal/com.oracle.truffle.ruby.shell/src/com/oracle/truffle/ruby/shell/Shell.java Tue Feb 04 11:17:09 2014 -0800 @@ -75,7 +75,7 @@ final RubyContext context = new RubyContext(new Configuration(configurationBuilder), new JRubyParser()); // Ruby should always have a debug context. - context.setDebugContext(new MinimumRubyDebugContext(context)); + context.setDebugContext(new MinimalRubyDebugContext(context)); // Bring in core method nodes diff -r 3f27e57439ed -r cf16ff2dba69 graal/com.oracle.truffle.ruby.test/src/com/oracle/truffle/ruby/test/RubyTests.java --- a/graal/com.oracle.truffle.ruby.test/src/com/oracle/truffle/ruby/test/RubyTests.java Mon Feb 03 20:58:23 2014 -0800 +++ b/graal/com.oracle.truffle.ruby.test/src/com/oracle/truffle/ruby/test/RubyTests.java Tue Feb 04 11:17:09 2014 -0800 @@ -80,7 +80,7 @@ }); final RubyContext context = new RubyContext(new Configuration(configurationBuilder), new JRubyParser()); - context.setDebugContext(new MinimumRubyDebugContext(context)); + context.setDebugContext(new MinimalRubyDebugContext(context)); CoreMethodNodeManager.addMethods(context.getCoreLibrary().getObjectClass()); context.getCoreLibrary().initializeAfterMethodsAdded();