-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- v5.0
- v4.20
- v4.19
- v4.18
- v4.17
- v4.16
- v4.15
- v4.14
- v4.13
- v4.12
- v4.11
- v4.10
- v4.9
- v4.8
- v4.7
- v4.6
- v4.5
- v4.4
- v4.3
- v4.2
- v4.1
- v4.0
- v3.107
- v3.106
- v3.105
- v3.104
- v3.103
- v3.102
- v3.101
- v3.100
- v3.99
- v3.98
- v3.97
- v3.96
- v3.95
- v3.94
- v3.93
- v3.92
- v3.91
- v3.90
- v3.89
- v3.88
- v3.87
- v3.86
- v3.85
- v3.84
- v3.83
- v3.82
- v3.81
- v3.80
- v3.79
- v3.78
- v3.77
- v3.76
- v3.75
- v3.74
- v3.73
- v3.72
- v3.71
- v3.70
- v3.69
- v3.68
- v3.67
- v3.66
- v3.65
- v3.64
- v3.63
- v3.62
- v3.61
- v3.60
- v3.59
- v3.58
- v3.57
- v3.56
- v3.55
- v3.54
- v3.53
- v3.52
- v3.51
- v3.50
- v3.49
- v3.48
Showing
9 changed files
with
115 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "alloc.hpp" | ||
|
||
#include "builtin/trie.hpp" | ||
|
||
namespace rubinius { | ||
uintptr_t Trie::fields_offset; | ||
|
||
void Trie::bootstrap(STATE) { | ||
Trie* trie = ALLOCA(Trie); | ||
fields_offset = (uintptr_t)&(trie->field) - (uintptr_t)trie; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef RBX_BUILTIN_TRIE_HPP | ||
#define RBX_BUILTIN_TRIE_HPP | ||
|
||
#include "memory.hpp" | ||
|
||
#include "builtin/object.hpp" | ||
|
||
namespace rubinius { | ||
class Trie : public DataHeader { | ||
public: | ||
const static object_type type = TrieType; | ||
static uintptr_t fields_offset; | ||
|
||
attr_field(full_size, native_int); | ||
attr_field(bitmap, native_int); | ||
|
||
Object* field[0]; | ||
|
||
public: | ||
native_int num_fields() const { | ||
return (full_size() - fields_offset) / sizeof(Object*); | ||
} | ||
|
||
static void bootstrap(STATE); | ||
|
||
class Info : public TypeInfo { | ||
public: | ||
Info(object_type type) | ||
: TypeInfo(type) | ||
{ | ||
allow_user_allocate = false; | ||
} | ||
|
||
virtual void mark(Object* obj, memory::ObjectMark& mark) {} | ||
virtual void auto_mark(Object* obj, memory::ObjectMark& mark) {} | ||
virtual void show(STATE, Object* self, int level) {} | ||
virtual void show_simple(STATE, Object* self, int level) {} | ||
virtual size_t object_size(const ObjectHeader* object) { return sizeof(Trie); } | ||
}; | ||
}; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters