Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

A few more docs

  • Loading branch information...
commit c3197d19c9d5a87af7dfd8cdda7258e18d1eaa3d 1 parent 7060708
Evan Phoenix authored
View
8 vm/ar.cpp
@@ -1,12 +1,20 @@
#include "ar.hpp"
+/*
+ * A simple ar(5) implementation. Used to load data from .rba's */
+
namespace rubinius {
+ /* Create an AR object for +path+ as an ar format file. */
Ar::Ar(const char* path) : path(path), fd(-1) { }
+
+ /* Closes any open descriptors. */
Ar::~Ar() {
if(fd > -1) ::close(fd);
}
+ /* Open up the archive, returning false if we were unable to open
+ * the path. */
bool Ar::open() {
fd = ::open(path, O_RDONLY);
View
5 vm/builtin_array.cpp
@@ -1,5 +1,10 @@
#include "builtin.hpp"
+/* Implementation certain Array methods. These methods are just
+ * the ones the VM requires, not the entire set of all Array methods.
+ * This includes methods required to implement certain Array
+ * primitives. */
+
namespace rubinius {
Array* Array::create(STATE, size_t idx) {
View
2  vm/builtin_bignum.cpp
@@ -1,3 +1,5 @@
+/* The implementation of Bignum, providing infinite size integers */
+
#include "prelude.hpp"
#include "object.hpp"
#include "objects.hpp"
View
3  vm/builtin_block_environment.cpp
@@ -1,3 +1,6 @@
+/* A BlockEnvironment is created when a block is created. Its primary
+ * operation is call, which activates the code associated with the block. */
+
#include "objects.hpp"
#include "objectmemory.hpp"
View
2  vm/builtin_bytearray.cpp
@@ -1,3 +1,5 @@
+/* The simple ByteArray class, used to implement String. */
+
#include "builtin.hpp"
namespace rubinius {
View
3  vm/builtin_channel.cpp
@@ -1,3 +1,6 @@
+/* The Channel class, provides a simple, Ruby thread safe communication
+ * mechanism. */
+
#include "builtin.hpp"
namespace rubinius {
View
8 vm/compiled_file.cpp
@@ -1,3 +1,11 @@
+/* A CompiledFile represents a .rbc. This class understands the layout
+ * of a .rbc file. It can validate and load the body into a CompiledMethod
+ * object.
+ *
+ * CompiledFile::execute is a root stack frame in Rubinius. It's where
+ * primary execution begins, when the VM loads the loader.rbc and executes
+ * it. */
+
#include "compiled_file.hpp"
#include "marshal.hpp"
View
3  vm/environment.cpp
@@ -1,3 +1,6 @@
+/* An Environment is the toplevel class for Rubinius. It manages multiple
+ * VMs, as well as imports C data from the process into Rubyland. */
+
#include "environment.hpp"
#include "compiled_file.hpp"
#include "probes.hpp"
View
3  vm/event.cpp
@@ -1,3 +1,6 @@
+/* A C++ wrapper around libev, which Rubinius uses for all event handling.
+ * This is the folcrum of the thread subsystem. */
+
#include "prelude.hpp"
#include "object.hpp"
#include "objects.hpp"
View
2  vm/ffi.cpp
@@ -1,3 +1,5 @@
+/* A simple C++ wrapper around libffi. */
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
View
2  vm/gc.cpp
@@ -1,3 +1,5 @@
+/* The GC superclass methods, used by both GCs. */
+
#include "gc.hpp"
#include "objectmemory.hpp"
View
3  vm/jit_state.h
@@ -1,6 +1,9 @@
#ifndef RBX_JIT_STATE_H
#define RBX_JIT_STATE_H
+/* This structure is used by the interpreter to hold context
+ * information. It may go away soon, being folded into MethodContext */
+
struct jit_state {
rubinius::Object** stack;
};
Please sign in to comment.
Something went wrong with that request. Please try again.