comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java @ 13455:69d2e4baa215

Truffle: new infrastructure related to instrumentation, and in particular debugging: support for managing Source objects; framework for generalized "instrumentation proxy nodes" (to be inserted into ASTs with no runtime cost when inactive), and "probes" (which can be attached to proxy nodes to receive event notification); a rudimentary interface and abstract implementation for a "debug manager" (mostly a placeholder at this point); and the beginning of a language-agnostic ExecutionContext interface.
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Tue, 17 Dec 2013 20:22:45 -0800
parents 71991b7a0f14
children 7c418666c6c9
comparison
equal deleted inserted replaced
13306:dfb780080923 13455:69d2e4baa215
1 /* 1 /*
2 * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
22 */ 22 */
23 package com.oracle.truffle.sl.runtime; 23 package com.oracle.truffle.sl.runtime;
24 24
25 import java.io.*; 25 import java.io.*;
26 26
27 import com.oracle.truffle.api.source.*;
27 import com.oracle.truffle.sl.builtins.*; 28 import com.oracle.truffle.sl.builtins.*;
28 29
29 public final class SLContext { 30 public final class SLContext {
30 31
31 private final PrintStream printOutput; 32 private final PrintStream printOutput;
32 private final SLFunctionRegistry functionRegistry; 33 private final SLFunctionRegistry functionRegistry;
34 private final SourceManager sourceManager;
33 35
34 public SLContext(PrintStream print) { 36 public SLContext(PrintStream print) {
35 this.printOutput = print; 37 this.printOutput = print;
36 this.functionRegistry = new SLFunctionRegistry(); 38 this.functionRegistry = new SLFunctionRegistry();
37 DefaultBuiltins.install(this); 39 DefaultBuiltins.install(this);
40 this.sourceManager = new SourceManager();
38 } 41 }
39 42
40 public PrintStream getPrintOutput() { 43 public PrintStream getPrintOutput() {
41 return printOutput; 44 return printOutput;
42 } 45 }
43 46
44 public SLFunctionRegistry getFunctionRegistry() { 47 public SLFunctionRegistry getFunctionRegistry() {
45 return functionRegistry; 48 return functionRegistry;
46 } 49 }
47 50
51 public SourceManager getSourceManager() {
52 return sourceManager;
53 }
54
48 } 55 }