Changeset 59817 in webkit for trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
- Timestamp:
- May 19, 2010, 9:57:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r59742 r59817 366 366 ++m_codeBlock->m_numParameters; 367 367 368 if ( functionBody->usesThis() || m_shouldEmitDebugHooks) {368 if (!isConstructor() && (functionBody->usesThis() || m_shouldEmitDebugHooks)) { 369 369 emitOpcode(op_convert_this); 370 370 instructions().append(m_thisRegister.index()); … … 1542 1542 } 1543 1543 1544 // Constructors use op_constructor_ret to check the result is an 1545 // object, unless we can trivially determine the check is not 1546 // necessary (currently, if the return value is 'this'). 1547 if (isConstructor() && (src->index() != m_thisRegister.index())) { 1548 emitOpcode(op_constructor_ret); 1549 instructions().append(src->index()); 1550 instructions().append(m_thisRegister.index()); 1551 return src; 1552 } 1544 1553 return emitUnaryNoDstOp(op_ret, src); 1545 1554 } … … 1607 1616 instructions().append(funcProto->index()); // proto 1608 1617 instructions().append(argv[0]->index()); // thisRegister 1609 1610 emitOpcode(op_construct_verify);1611 instructions().append(dst->index());1612 instructions().append(argv[0]->index());1613 1618 1614 1619 if (m_shouldEmitProfileHooks) {
Note:
See TracChangeset
for help on using the changeset viewer.