Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 90 lines (69 sloc) 1.971 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 @agardiner 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 @agardiner 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 @agardiner 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
b8b06c3 @brixen Added language version tagging to .rbc files.
brixen authored
44 // The Ruby library version with which the .rbc file is compatible.
45 int version_;
46
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
47 public:
6cfae75 Add VMManager, fix exit to behave well
Evan Phoenix authored
48 SharedState* shared;
388b751 Wire up primitives to be resolved and executed.
Evan Phoenix authored
49 VM* state;
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
50 QueryAgent* agent;
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
51
37dc489 Add real Configuration infrastructure
Evan Phoenix authored
52 ConfigParser config_parser;
53 Configuration config;
54
4ff7d5e Set std::terminate to provide better error message
Evan Phoenix authored
55 public:
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
56 Environment(int argc, char** argv);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
57 ~Environment();
58
0051012 Allow loopback agent to bind to a TCP port
Evan Phoenix authored
59 int argc() {
60 return argc_;
61 }
62
63 char** argv() {
64 return argv_;
65 }
66
4ff7d5e Set std::terminate to provide better error message
Evan Phoenix authored
67 void setup_cpp_terminate();
68
803e459 @brixen Parse VM options before booting the VM.
brixen authored
69 void load_vm_options(int argc, char** argv);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
70 void load_argv(int argc, char** argv);
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
71 void load_kernel(std::string root);
41ff5e1 @brixen Reworked building multiple language versions of kernel.
brixen authored
72 void load_directory(std::string dir);
5d2da0c @drbrain Parse runtime/platform.conf
drbrain authored
73 void load_platform_conf(std::string dir);
878ca1b Add ability to load options from a file
Evan Phoenix authored
74 void load_conf(std::string path);
75 void load_string(std::string str);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
76 void run_file(std::string path);
73fb486 Introduce tooling API, convert profiler to it.
Evan Phoenix authored
77 void load_tool();
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
78 void run_from_filesystem(std::string root);
6c31ab6 Add cli switch to enable jit
Evan Phoenix authored
79 void boot_vm();
db6659b Refactor Environment/cli.cpp around
Evan Phoenix authored
80
0c8eb66 Healthy living through better thread management
Evan Phoenix authored
81 void halt();
6cfae75 Add VMManager, fix exit to behave well
Evan Phoenix authored
82 int exit_code();
e6bb96a Fix a number of IO/Signal interaction issues
Evan Phoenix authored
83 void start_signals();
ff881b8 Started query agent, mainly just groundwork thus far
Evan Phoenix authored
84 void start_agent(int port);
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
85 };
c11533d @drbrain Move Rubinius::Terminal constant to kernel, wire up IO#tty? to suppor…
drbrain authored
86
feb91b4 Tons of stuff (too much probably)
Evan Phoenix authored
87 }
88
89 #endif
Something went wrong with that request. Please try again.