Changeset 38291 in webkit for trunk/JavaScriptCore/VM/CTI.cpp
- Timestamp:
- Nov 10, 2008, 9:55:50 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CTI.cpp
r38290 r38291 169 169 #endif 170 170 171 ALWAYS_INLINE JSValue* CTI::getConstant(int src)172 {173 return m_codeBlock->constantRegisters[src - m_codeBlock->numVars].getJSValue();174 }175 176 171 inline uintptr_t CTI::asInteger(JSValue* value) 177 172 { … … 184 179 // TODO: we want to reuse values that are already in registers if we can - add a register allocator! 185 180 if (m_codeBlock->isConstantRegisterIndex(src)) { 186 JSValue* js = getConstant(src);181 JSValue* js = m_codeBlock->getConstant(src); 187 182 m_jit.movl_i32r(asInteger(js), dst); 188 183 } else … … 194 189 { 195 190 if (m_codeBlock->isConstantRegisterIndex(src)) { 196 JSValue* js = getConstant(src);191 JSValue* js = m_codeBlock->getConstant(src); 197 192 m_jit.movl_i32m(asInteger(js), offset + sizeof(void*), X86::esp); 198 193 } else { … … 216 211 { 217 212 if (m_codeBlock->isConstantRegisterIndex(src)) { 218 JSValue* js = getConstant(src);213 JSValue* js = m_codeBlock->getConstant(src); 219 214 return JSImmediate::isNumber(js) ? js : noValue(); 220 215 } … … 275 270 char which1 = '*'; 276 271 if (m_codeBlock->isConstantRegisterIndex(src1)) { 277 JSValue* js = getConstant(src1);272 JSValue* js = m_codeBlock->getConstant(src1); 278 273 which1 = 279 274 JSImmediate::isImmediate(js) ? … … 289 284 char which2 = '*'; 290 285 if (m_codeBlock->isConstantRegisterIndex(src2)) { 291 JSValue* js = getConstant(src2);286 JSValue* js = m_codeBlock->getConstant(src2); 292 287 which2 = 293 288 JSImmediate::isImmediate(js) ? … … 1006 1001 unsigned src = instruction[i + 2].u.operand; 1007 1002 if (m_codeBlock->isConstantRegisterIndex(src)) 1008 m_jit.movl_i32r(asInteger( getConstant(src)), X86::eax);1003 m_jit.movl_i32r(asInteger(m_codeBlock->getConstant(src)), X86::eax); 1009 1004 else 1010 1005 emitGetArg(src, X86::eax);
Note:
See TracChangeset
for help on using the changeset viewer.