-
Notifications
You must be signed in to change notification settings - Fork 0
Rubinius
irxground edited this page Apr 4, 2012
·
9 revisions
Rubiniusをコードリーディングするときのメモ
-
Entry Point:
vm/drivers/cli.cppEnvironment env(argc, argv); env.load_string(var); if getenv("RBX_OPTIONS") // -> config_parser.import_many(str); env.load_conf(path); if getenv("RBX_OPTFILE") // -> config_parser.import_stream(stream); env.run_from_filesystem(getenv("RBX_RUNTIME") || global::RBX_RUNTIME);
-
rubinius::Environment
vm/environment.cpp-
VM::init_stack_size(); shared = new SharedState(this, config, config_parser); root_vm = shared->new_vm(); state = new State(root_vm); -
state->vm()->set_root_stack(reinterpret_cast<uintptr_t>(&i), VM::cStackDepthMax); state->vm()->initialize_as_root(); state->vm()->initialize_config(); load_kernel(root); // -> run_file(root + "/alpha.rbc"); run_file(root + "/loader.rbc"); state->vm()->thread_state()->clear();Object* loader = G(rubinius)->get_const(state, state->symbol("Loader")); OnStack<1> os(state, loader); Object* inst = loader->send(state, 0, state->symbol("new")); OnStack<1> os2(state, inst); inst->send(state, 0, state->symbol("main"));
-