This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| d769c944 » | evanphx | 2008-03-25 | 1 | #ifndef RBX_BUILTIN_CLASS_HPP | |
| 2 | #define RBX_BUILTIN_CLASS_HPP | ||||
| 3 | |||||
| 4 | #include "prelude.hpp" | ||||
| 5 | #include "object.hpp" | ||||
| 6 | |||||
| 7 | namespace rubinius { | ||||
| 8 | class Module : public BuiltinType { | ||||
| 9 | public: | ||||
| 10 | const static size_t fields = 7; | ||||
| 11 | OBJECT instance_variables; | ||||
| 12 | OBJECT method_table; | ||||
| 13 | OBJECT method_cache; | ||||
| 14 | OBJECT name; | ||||
| 15 | OBJECT constants; | ||||
| 16 | OBJECT encloser; | ||||
| 17 | OBJECT superclass; | ||||
| 18 | |||||
| 19 | void setup(STATE); | ||||
| 20 | }; | ||||
| 21 | |||||
| 22 | class Class : public Module { | ||||
| 23 | public: | ||||
| 24 | const static size_t fields = 11; | ||||
| 25 | OBJECT instance_fields; | ||||
| 26 | OBJECT has_ivars; | ||||
| 27 | OBJECT needs_cleanup; | ||||
| 28 | OBJECT object_type; | ||||
| 29 | |||||
| 30 | static bool is_a(OBJECT obj) { | ||||
| 31 | return obj->obj_type == ClassType; | ||||
| 32 | } | ||||
| 33 | }; | ||||
| 34 | |||||
| 35 | class MetaClass : public Class { | ||||
| 36 | public: | ||||
| 37 | const static size_t fields = 12; | ||||
| 38 | OBJECT attached_instance; | ||||
| 39 | |||||
| 40 | static bool is_a(OBJECT obj) { | ||||
| 41 | return obj->obj_type == MetaclassType; | ||||
| 42 | } | ||||
| 43 | |||||
| 44 | static OBJECT attach(STATE, OBJECT obj, OBJECT sup = NULL); | ||||
| 45 | }; | ||||
| 46 | |||||
| 47 | class IncludedModule : public Module { | ||||
| 48 | public: | ||||
| 49 | |||||
| 50 | OBJECT module; | ||||
| 51 | }; | ||||
| 52 | |||||
| 53 | }; | ||||
| 54 | |||||
| 55 | #endif | ||||







