Changeset 38290 in webkit for trunk/JavaScriptCore
- Timestamp:
- Nov 10, 2008, 9:45:14 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r38289 r38290 1 2008-11-10 Cameron Zwarich <[email protected]> 2 3 Reviewed by Sam Weinig. 4 5 Rename CodeBlock::isConstant() to isConstantRegisterIndex(). 6 7 * VM/CTI.cpp: 8 (JSC::CTI::emitGetArg): 9 (JSC::CTI::emitGetPutArg): 10 (JSC::CTI::getConstantImmediateNumericArg): 11 (JSC::CTI::printOpcodeOperandTypes): 12 (JSC::CTI::privateCompileMainPass): 13 * VM/CodeBlock.h: 14 (JSC::CodeBlock::isConstantRegisterIndex): 15 * bytecompiler/CodeGenerator.cpp: 16 (JSC::CodeGenerator::emitEqualityOp): 17 1 18 2008-11-10 Gavin Barraclough <[email protected]> 2 19 -
trunk/JavaScriptCore/VM/CTI.cpp
r38286 r38290 183 183 { 184 184 // TODO: we want to reuse values that are already in registers if we can - add a register allocator! 185 if (m_codeBlock->isConstant (src)) {185 if (m_codeBlock->isConstantRegisterIndex(src)) { 186 186 JSValue* js = getConstant(src); 187 187 m_jit.movl_i32r(asInteger(js), dst); … … 193 193 ALWAYS_INLINE void CTI::emitGetPutArg(unsigned src, unsigned offset, X86Assembler::RegisterID scratch) 194 194 { 195 if (m_codeBlock->isConstant (src)) {195 if (m_codeBlock->isConstantRegisterIndex(src)) { 196 196 JSValue* js = getConstant(src); 197 197 m_jit.movl_i32m(asInteger(js), offset + sizeof(void*), X86::esp); … … 215 215 ALWAYS_INLINE JSValue* CTI::getConstantImmediateNumericArg(unsigned src) 216 216 { 217 if (m_codeBlock->isConstant (src)) {217 if (m_codeBlock->isConstantRegisterIndex(src)) { 218 218 JSValue* js = getConstant(src); 219 219 return JSImmediate::isNumber(js) ? js : noValue(); … … 274 274 { 275 275 char which1 = '*'; 276 if (m_codeBlock->isConstant (src1)) {276 if (m_codeBlock->isConstantRegisterIndex(src1)) { 277 277 JSValue* js = getConstant(src1); 278 278 which1 = … … 288 288 } 289 289 char which2 = '*'; 290 if (m_codeBlock->isConstant (src2)) {290 if (m_codeBlock->isConstantRegisterIndex(src2)) { 291 291 JSValue* js = getConstant(src2); 292 292 which2 = … … 1005 1005 case op_mov: { 1006 1006 unsigned src = instruction[i + 2].u.operand; 1007 if (m_codeBlock->isConstant (src))1007 if (m_codeBlock->isConstantRegisterIndex(src)) 1008 1008 m_jit.movl_i32r(asInteger(getConstant(src)), X86::eax); 1009 1009 else -
trunk/JavaScriptCore/VM/CodeBlock.h
r38287 r38290 291 291 } 292 292 293 ALWAYS_INLINE bool isConstant (int index)293 ALWAYS_INLINE bool isConstantRegisterIndex(int index) 294 294 { 295 295 return index >= numVars && index < numVars + numConstants; -
trunk/JavaScriptCore/bytecompiler/CodeGenerator.cpp
r38249 r38290 787 787 if (src1->index() == dstIndex 788 788 && src1->isTemporary() 789 && m_codeBlock->isConstant (src2->index())789 && m_codeBlock->isConstantRegisterIndex(src2->index()) 790 790 && m_codeBlock->constantRegisters[src2->index() - m_codeBlock->numVars].jsValue(m_scopeChain->globalObject()->globalExec())->isString()) { 791 791 const UString& value = asString(m_codeBlock->constantRegisters[src2->index() - m_codeBlock->numVars].jsValue(m_scopeChain->globalObject()->globalExec()))->value();
Note:
See TracChangeset
for help on using the changeset viewer.