@@ -41,8 +41,8 @@ handles.
41
41
42
42
We implement an ` ExtensionCallStack ` object to keep track of various
43
43
bits of useful information during a call to a C extension. Each stack
44
- entry contains a ` preservedOject ` , and an additional potential
45
- ` preservedObject ` list which together will contain all the
44
+ entry contains a ` preservedObject ` , and an additional potential
45
+ ` preservedObjects ` list which together will contain all the
46
46
` ValueWrapper ` s converted to native handles during the process of a
47
47
call. When a new call is made a new ` ExtensionCallStackEntry ` is added
48
48
to the stack, and when the call exits that entry is popped off again.
@@ -83,22 +83,22 @@ When converted to native, the `ValueWrapper` takes the following long values.
83
83
The built in objects, ` true ` , ` false ` , ` nil ` , and ` undefined ` are
84
84
handled specially, and integers are relatively easy because there is a
85
85
well defined mapping from the native representation to the integer and
86
- vice varsa , but to manage objects we need to do a little more work.
86
+ vice versa , but to manage objects we need to do a little more work.
87
87
88
88
When we convert an object ` VALUE ` to its native representation we need
89
89
to keep the corresponding ` ValueWrapper ` object alive, and we need to
90
90
record that mapping from handle to ` ValueWrapper ` somewhere. The
91
91
mapping from ` ValueWrapper ` to handle must also be stable, so a symbol
92
92
or other immutable object that can outlive a context will need to
93
- store that mapping somewhere on the ` RubyLangage ` object.
93
+ store that mapping somewhere on the ` RubyLanguage ` object.
94
94
95
95
We achieve all this through a combination of handle block maps and
96
96
allocators. We deal with handles in blocks of 4096, and the current
97
97
` RubyFiber ` holds onto a ` HandleBlockHolder ` which in turn holds the
98
98
current block for mutable objects (which cannot outlive the
99
99
` RubyContext ` ) and immutable objects (which can outlive the
100
100
context). Each fiber will take values from those blocks until they
101
- becomes exhausted. When that block is exhausted then ` RubyLanauge `
101
+ becomes exhausted. When that block is exhausted then ` RubyLanguage `
102
102
holds a ` HandleBlockAllocator ` which is responsible for allocating new
103
103
blocks and recycling old ones. These blocks of handles however only
104
104
hold weak references, because we don't want a conversion to native to
0 commit comments