Skip to content

Commit 87128db

Browse files
committedJul 26, 2016
Moved oop.[ch]pp to memory/header.[ch]pp.
First, OOP is obscure to newcomers wouldn't have any basis to know what an object-oriented pointer (really a "tagged pointer") is. Second, with the addition of non-OO managed memory objects, the name is no longer accurate. MemoryHeader is both descriptive and accurate.
1 parent 8a6c33a commit 87128db

14 files changed

+29
-21
lines changed
 

‎machine/builtin/object.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
#include <vector>
55

66
#include "defines.hpp"
7+
#include "memory/header.hpp"
8+
79
#include "vm.hpp"
810
#include "state.hpp"
9-
#include "oop.hpp"
1011
#include "type_info.hpp"
1112
#include "executor.hpp"
1213

‎machine/builtin/string.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "configuration.hpp"
1010
#include "object_utils.hpp"
1111
#include "memory.hpp"
12-
#include "oop.hpp"
12+
#include "memory/header.hpp"
1313

1414
#include <ctype.h> // For isdigit and friends
1515
#include <errno.h> // For ERANGE

‎machine/defines.hpp

+8-9
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@
44
/**
55
* @file defines.hpp
66
*
7-
* Notably here, Symbols, Fixnums and true/false/nil are actually
8-
* stored directly in the pointer value (and distinguished by the
9-
* tag, see oop.hpp) but provided we do not attempt to dereference
10-
* it, we can ALSO define a class and treat the pointer values as
11-
* if they were real pointers to real objects of that class where
12-
* typing is concerned. In the "instance methods", the this pointer
13-
* is still the correct pointer value and can thus be used for the
14-
* calculations needed.
7+
* Notably here, Symbols, Fixnums and true/false/nil are actually stored
8+
* directly in the pointer value (and distinguished by the tag, see
9+
* memory/header.hpp) but provided we do not attempt to dereference it, we
10+
* can ALSO define a class and treat the pointer values as if they were real
11+
* pointers to real objects of that class where typing is concerned. In the
12+
* "instance methods", the this pointer is still the correct pointer value
13+
* and can thus be used for the calculations needed.
1514
*
16-
* @see oop.hpp
15+
* @see memory/header.hpp
1716
*/
1817

1918
#include <stdint.h>

‎machine/drivers/cli.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
#include <llvm/Support/ManagedStatic.h>
77

88
#include "environment.hpp"
9-
#include "oop.hpp"
109
#include "type_info.hpp"
1110
#include "exception.hpp"
1211

12+
#include "memory/header.hpp"
13+
1314
#include "config.h"
1415
#include "paths.h"
1516

‎machine/global_cache.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#ifndef RBX_VM_GLOBAL_CACHE_HPP
22
#define RBX_VM_GLOBAL_CACHE_HPP
33

4-
#include "oop.hpp"
4+
#include "memory/header.hpp"
5+
56
#include "object_utils.hpp"
67
#include "builtin/compiled_code.hpp"
78
#include "builtin/symbol.hpp"

‎machine/include/capi/capi_oop.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* value. Passing Fixnums through means that all the Fixnum conversions
4242
* do not have to be reimplemented for the C-API.
4343
*
44-
* The tags break down as follows (@see machine/oop.hpp for more details):
44+
* The tags break down as follows (@see machine/memory/header.hpp for more details):
4545
*
4646
* 00 0 0000 Qfalse
4747
* xx x xxx1 Fixnum

‎machine/memory.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
#define RBX_OBJECTMEMORY_H
33

44
#include "defines.hpp"
5+
#include "memory/header.hpp"
6+
57
#include "type_info.hpp"
68
#include "object_position.hpp"
7-
#include "oop.hpp"
89
#include "metrics.hpp"
910
#include "configuration.hpp"
1011

‎machine/memory/gc.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
#include <list>
55

6-
#include "oop.hpp"
6+
#include "memory/header.hpp"
7+
78
#include "shared_state.hpp"
89

910
#include "builtin/object.hpp"

‎machine/oop.cpp renamed to ‎machine/memory/header.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#include "util/atomic.hpp"
22

3+
#include "memory/header.hpp"
4+
35
#include "bug.hpp"
46
#include "configuration.hpp"
57
#include "memory.hpp"
68
#include "on_stack.hpp"
7-
#include "oop.hpp"
89
#include "thread_phase.hpp"
910

1011
#include "builtin/object.hpp"
File renamed without changes.

‎machine/memory/inflated_headers.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "oop.hpp"
1+
#include "memory/header.hpp"
2+
23
#include "vm.hpp"
34
#include "state.hpp"
45
#include "memory.hpp"

‎machine/memory/root.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
#include <stdexcept>
66

7+
#include "memory/header.hpp"
8+
79
#include "linkedlist.hpp"
8-
#include "oop.hpp"
910
#include "defines.hpp"
1011

1112
#include "util/thread.hpp"

‎machine/symbol_table.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#ifndef RBX_SYMBOLTABLE_HPP
22
#define RBX_SYMBOLTABLE_HPP
33

4-
#include "oop.hpp"
4+
#include "memory/header.hpp"
5+
56
#include "defines.hpp"
67
#include "diagnostics.hpp"
78

‎machine/test/test_memory_header.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "machine/test/test.hpp"
22

3-
#include "oop.hpp"
3+
#include "memory/header.hpp"
44

55
#include <cxxtest/TestSuite.h>
66

0 commit comments

Comments
 (0)
Please sign in to comment.