Changeset 36695 in webkit for trunk/JavaScriptCore/VM
- Timestamp:
- Sep 19, 2008, 8:00:43 PM (17 years ago)
- Location:
- trunk/JavaScriptCore/VM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CTI.cpp
r36605 r36695 178 178 { 179 179 m_jit.movl_rm(from, dst * sizeof(Register), X86::edi); 180 // FIXME: #ifndef NDEBUG, Write the correct m_type to the register. 181 } 182 183 ALWAYS_INLINE void CTI::emitInitialiseRegister(unsigned dst) 184 { 185 m_jit.movl_i32m(reinterpret_cast<unsigned>(jsUndefined()), dst * sizeof(Register), X86::edi); 180 186 // FIXME: #ifndef NDEBUG, Write the correct m_type to the register. 181 187 } … … 526 532 void CTI::privateCompileMainPass() 527 533 { 534 if (m_codeBlock->codeType == FunctionCode) { 535 for (int i = -m_codeBlock->numVars; i < 0; i++) 536 emitInitialiseRegister(i); 537 } 538 for (size_t i = 0; i < m_codeBlock->constantRegisters.size(); ++i) 539 emitInitialiseRegister(i); 540 528 541 Instruction* instruction = m_codeBlock->instructions.begin(); 529 542 unsigned instructionCount = m_codeBlock->instructions.size(); … … 1522 1535 break; 1523 1536 } 1537 case op_initialise_locals: { 1538 i++; 1539 break; 1540 } 1524 1541 case op_get_array_length: 1525 1542 case op_get_by_id_chain: -
trunk/JavaScriptCore/VM/CTI.h
r36514 r36695 346 346 void emitPutResult(unsigned dst, X86Assembler::RegisterID from = X86::eax); 347 347 348 void emitInitialiseRegister(unsigned dst); 349 348 350 void emitPutCTIParam(void* value, unsigned name); 349 351 void emitPutCTIParam(X86Assembler::RegisterID from, unsigned name); -
trunk/JavaScriptCore/VM/CodeBlock.cpp
r36480 r36695 352 352 int location = it - begin; 353 353 switch (exec->machine()->getOpcodeID(it->u.opcode)) { 354 case op_initialise_locals: { 355 printf("[%4d] initialise_locals\n", location); 356 break; 357 } 354 358 case op_unexpected_load: { 355 359 int r0 = (++it)->u.operand; -
trunk/JavaScriptCore/VM/CodeGenerator.cpp
r36660 r36695 269 269 , m_lastOpcodeID(op_end) 270 270 { 271 emitOpcode(op_initialise_locals); 271 272 codeBlock->globalData = m_globalData; 272 273 … … 317 318 , m_lastOpcodeID(op_end) 318 319 { 320 emitOpcode(op_initialise_locals); 319 321 codeBlock->globalData = m_globalData; 320 322 -
trunk/JavaScriptCore/VM/Machine.cpp
r36604 r36695 544 544 545 545 // initialize local variable slots 546 for (Register* it = r - newCodeBlock->numVars; it != r; ++it) 547 (*it) = jsUndefined(); 548 549 for (size_t i = 0; i < newCodeBlock->constantRegisters.size(); ++i) 550 r[i] = newCodeBlock->constantRegisters[i]; 546 #if ENABLE(CTI) 547 if (!newCodeBlock->ctiCode) 548 #endif 549 { 550 551 } 551 552 552 553 return r; … … 3344 3345 NEXT_OPCODE; 3345 3346 } 3347 BEGIN_OPCODE(op_initialise_locals) { 3348 for (Register* it = r - codeBlock->numVars + (codeBlock->codeType == EvalCode); it < r; ++it) 3349 (*it) = jsUndefined(); 3350 for (size_t i = 0; i < codeBlock->constantRegisters.size(); ++i) 3351 r[i] = codeBlock->constantRegisters[i]; 3352 ++vPC; 3353 NEXT_OPCODE; 3354 } 3346 3355 BEGIN_OPCODE(op_construct) { 3347 3356 /* construct dst(r) constr(r) constrProto(r) firstArg(r) argCount(n) -
trunk/JavaScriptCore/VM/Opcode.h
r36480 r36695 41 41 42 42 #define FOR_EACH_OPCODE_ID(macro) \ 43 macro(op_initialise_locals) \ 43 44 macro(op_unexpected_load) \ 44 45 macro(op_new_object) \
Note:
See TracChangeset
for help on using the changeset viewer.