Changeset 38229 in webkit for trunk/JavaScriptCore/VM/CTI.cpp
- Timestamp:
- Nov 7, 2008, 12:41:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CTI.cpp
r38209 r38229 169 169 #endif 170 170 171 ALWAYS_INLINE bool CTI::isConstant(int src)172 {173 return src >= m_codeBlock->numVars && src < m_codeBlock->numVars + m_codeBlock->numConstants;174 }175 176 171 ALWAYS_INLINE JSValue* CTI::getConstant(CallFrame* callFrame, int src) 177 172 { … … 188 183 { 189 184 // TODO: we want to reuse values that are already in registers if we can - add a register allocator! 190 if ( isConstant(src)) {185 if (m_codeBlock->isConstant(src)) { 191 186 JSValue* js = getConstant(m_callFrame, src); 192 187 m_jit.movl_i32r(asInteger(js), dst); … … 198 193 ALWAYS_INLINE void CTI::emitGetPutArg(unsigned src, unsigned offset, X86Assembler::RegisterID scratch) 199 194 { 200 if ( isConstant(src)) {195 if (m_codeBlock->isConstant(src)) { 201 196 JSValue* js = getConstant(m_callFrame, src); 202 197 m_jit.movl_i32m(asInteger(js), offset + sizeof(void*), X86::esp); … … 220 215 ALWAYS_INLINE JSValue* CTI::getConstantImmediateNumericArg(unsigned src) 221 216 { 222 if ( isConstant(src)) {217 if (m_codeBlock->isConstant(src)) { 223 218 JSValue* js = getConstant(m_callFrame, src); 224 219 return JSImmediate::isNumber(js) ? js : noValue(); … … 279 274 { 280 275 char which1 = '*'; 281 if ( isConstant(src1)) {276 if (m_codeBlock->isConstant(src1)) { 282 277 JSValue* js = getConstant(m_callFrame, src1); 283 278 which1 = … … 293 288 } 294 289 char which2 = '*'; 295 if ( isConstant(src2)) {290 if (m_codeBlock->isConstant(src2)) { 296 291 JSValue* js = getConstant(m_callFrame, src2); 297 292 which2 = … … 1007 1002 case op_mov: { 1008 1003 unsigned src = instruction[i + 2].u.operand; 1009 if ( isConstant(src))1004 if (m_codeBlock->isConstant(src)) 1010 1005 m_jit.movl_i32r(asInteger(getConstant(m_callFrame, src)), X86::eax); 1011 1006 else
Note:
See TracChangeset
for help on using the changeset viewer.