101
100
ScopeChainNode* scopeChain;
102
101
Instruction* vPC;
118
PropertyNameIteratorType,
126
#define SET_TYPE(type) m_type = (type)
127
// FIXME: The CTI code to put value into registers doesn't set m_type.
128
// Once it does, we can turn this assertion back on.
129
#define ASSERT_TYPE(type)
131
#define SET_TYPE(type)
132
#define ASSERT_TYPE(type)
135
105
ALWAYS_INLINE Register::Register()
139
u.value = JSValuePtr::encode(noValue());
108
u.value = JSValue::encode(JSValue());
143
ALWAYS_INLINE Register::Register(JSValuePtr v)
112
ALWAYS_INLINE Register::Register(JSValue v)
146
u.value = JSValuePtr::encode(v);
114
u.value = JSValue::encode(v);
149
// This function is scaffolding for legacy clients. It will eventually go away.
150
ALWAYS_INLINE JSValuePtr Register::jsValue(CallFrame*) const
152
// Once registers hold doubles, this function will allocate a JSValue*
153
// if the register doesn't hold one already.
154
ASSERT_TYPE(ValueType);
155
return JSValuePtr::decode(u.value);
158
ALWAYS_INLINE JSValuePtr Register::getJSValue() const
160
ASSERT_TYPE(JSValueType);
161
return JSValuePtr::decode(u.value);
117
ALWAYS_INLINE JSValue Register::jsValue() const
119
return JSValue::decode(u.value);
164
122
ALWAYS_INLINE bool Register::marked() const
166
return getJSValue().marked();
124
return jsValue().marked();
169
127
ALWAYS_INLINE void Register::mark()
174
132
// Interpreter functions
176
134
ALWAYS_INLINE Register::Register(Arguments* arguments)
178
SET_TYPE(ArgumentsType);
179
136
u.arguments = arguments;
182
139
ALWAYS_INLINE Register::Register(JSActivation* activation)
184
SET_TYPE(ActivationType);
185
141
u.activation = activation;
188
144
ALWAYS_INLINE Register::Register(CallFrame* callFrame)
190
SET_TYPE(CallFrameType);
191
146
u.callFrame = callFrame;
194
149
ALWAYS_INLINE Register::Register(CodeBlock* codeBlock)
196
SET_TYPE(CodeBlockType);
197
151
u.codeBlock = codeBlock;
200
154
ALWAYS_INLINE Register::Register(JSFunction* function)
202
SET_TYPE(FunctionType);
203
156
u.function = function;
206
159
ALWAYS_INLINE Register::Register(Instruction* vPC)
208
SET_TYPE(InstructionType);
212
164
ALWAYS_INLINE Register::Register(ScopeChainNode* scopeChain)
214
SET_TYPE(ScopeChainNodeType);
215
166
u.scopeChain = scopeChain;
218
169
ALWAYS_INLINE Register::Register(JSPropertyNameIterator* propertyNameIterator)
220
SET_TYPE(PropertyNameIteratorType);
221
171
u.propertyNameIterator = propertyNameIterator;
224
174
ALWAYS_INLINE Register::Register(intptr_t i)
230
179
ALWAYS_INLINE intptr_t Register::i() const
232
ASSERT_TYPE(IntType);
241
189
ALWAYS_INLINE JSActivation* Register::activation() const
243
ASSERT_TYPE(ActivationType);
244
191
return u.activation;
247
194
ALWAYS_INLINE Arguments* Register::arguments() const
249
ASSERT_TYPE(ArgumentsType);
250
196
return u.arguments;
253
199
ALWAYS_INLINE CallFrame* Register::callFrame() const
255
ASSERT_TYPE(CallFrameType);
256
201
return u.callFrame;
259
204
ALWAYS_INLINE CodeBlock* Register::codeBlock() const
261
ASSERT_TYPE(CodeBlockType);
262
206
return u.codeBlock;
265
209
ALWAYS_INLINE JSFunction* Register::function() const
267
ASSERT_TYPE(FunctionType);
268
211
return u.function;
271
214
ALWAYS_INLINE JSPropertyNameIterator* Register::propertyNameIterator() const
273
ASSERT_TYPE(PropertyNameIteratorType);
274
216
return u.propertyNameIterator;
277
219
ALWAYS_INLINE ScopeChainNode* Register::scopeChain() const
279
ASSERT_TYPE(ScopeChainNodeType);
280
221
return u.scopeChain;
283
224
ALWAYS_INLINE Instruction* Register::vPC() const
285
ASSERT_TYPE(InstructionType);
292
229
} // namespace JSC