Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 87 lines (67 sloc) 1.901 kb
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
1 #ifndef RBX_ENVIRONMENT_HPP
2 #define RBX_ENVIRONMENT_HPP
3
4 #include <string>
5 #include <stdexcept>
6
43c1c3c One more cycle broken
Ryan Davis authored
7 #include "vm.hpp"
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
8 #include "config_parser.hpp"
9 #include "configuration.hpp"
43c1c3c One more cycle broken
Ryan Davis authored
10
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
11 namespace rubinius {
12
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
13 class ConfigParser;
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
14 class QueryAgent;
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
15
2749c19 Adam Gardiner Add/update Doxygen class comments for several classes
agardiner authored
16 /**
17 * Thrown when there is a bad signature on a kernel .rbc file.
18 */
6fa3dc4 Add compiler signature/version checking
Evan Phoenix authored
19 class BadKernelFile : public std::runtime_error {
20 public:
21 BadKernelFile(const std::string& str)
22 : std::runtime_error(str)
23 {}
24 };
25
2749c19 Adam Gardiner Add/update Doxygen class comments for several classes
agardiner authored
26
27 /**
28 * The environment context under which Rubinius virtual machines are executed.
29 *
30 * Environment and configuration data is processed and stored in an Environment
31 * instance, which uses this information to bootstrap the VM. It also stores
32 * all runtime shared state.
33 */
34
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
35 class Environment {
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
36 int argc_;
37 char** argv_;
38
2749c19 Adam Gardiner Add/update Doxygen class comments for several classes
agardiner authored
39 /// Signature to be used to verify the validity of .rbc files.
40 /// If the signature in a .rbc file does not match this value, the file
41 /// needs to be recompiled.
6fa3dc4 Add compiler signature/version checking
Evan Phoenix authored
42 uint64_t signature_;
43
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
44 public:
6cfae75 Add VMManager, fix exit to behave well
Evan Phoenix authored
45 SharedState* shared;
388b751 Wire up primitives to be resolved and executed.
Evan Phoenix authored
46 VM* state;
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
47 QueryAgent* agent;
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
48
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
49 ConfigParser config_parser;
50 Configuration config;
51
4ff7d5e Set std::terminate to provide better error message
Evan Phoenix authored
52 public:
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
53 Environment(int argc, char** argv);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
54 ~Environment();
55
0051012 Allow loopback agent to bind to a TCP port
Evan Phoenix authored
56 int argc() {
57 return argc_;
58 }
59
60 char** argv() {
61 return argv_;
62 }
63
4ff7d5e Set std::terminate to provide better error message
Evan Phoenix authored
64 void setup_cpp_terminate();
65
803e459 Brian Shirai Parse VM options before booting the VM.
brixen authored
66 void load_vm_options(int argc, char** argv);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
67 void load_argv(int argc, char** argv);
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
68 void load_kernel(std::string root);
28a111e Brian Shirai Simplify building, loading runtime directory.
brixen authored
69 void load_directory(std::string dir, std::string version);
5d2da0c Eric Hodel Parse runtime/platform.conf
drbrain authored
70 void load_platform_conf(std::string dir);
878ca1b Add ability to load options from a file
Evan Phoenix authored
71 void load_conf(std::string path);
72 void load_string(std::string str);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
73 void run_file(std::string path);
73fb486 Introduce tooling API, convert profiler to it.
Evan Phoenix authored
74 void load_tool();
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
75 void run_from_filesystem(std::string root);
6c31ab6 Add cli switch to enable jit
Evan Phoenix authored
76 void boot_vm();
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
77
0c8eb66 Healthy living through better thread management
Evan Phoenix authored
78 void halt();
6cfae75 Add VMManager, fix exit to behave well
Evan Phoenix authored
79 int exit_code();
e6bb96a Fix a number of IO/Signal interaction issues
Evan Phoenix authored
80 void start_signals();
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
81 void start_agent(int port);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
82 };
c11533d Eric Hodel Move Rubinius::Terminal constant to kernel, wire up IO#tty? to support i...
drbrain authored
83
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
84 }
85
86 #endif
Something went wrong with that request. Please try again.