Changeset 99898 in webkit for trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
- Timestamp:
- Nov 10, 2011, 1:59:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r99810 r99898 1408 1408 } 1409 1409 1410 CodeBlock::CodeBlock(CopyParsedBlockTag, CodeBlock& other, SymbolTable* symTab) 1411 : m_globalObject(other.m_globalObject) 1412 , m_heap(other.m_heap) 1413 , m_numCalleeRegisters(other.m_numCalleeRegisters) 1414 , m_numVars(other.m_numVars) 1415 , m_numCapturedVars(other.m_numCapturedVars) 1416 , m_numParameters(other.m_numParameters) 1417 , m_isConstructor(other.m_isConstructor) 1418 , m_shouldDiscardBytecode(false) 1419 , m_ownerExecutable(*other.m_globalData, other.m_ownerExecutable.get(), other.m_ownerExecutable.get()) 1420 , m_globalData(other.m_globalData) 1421 , m_instructions(other.m_instructions) 1422 , m_instructionCount(other.m_instructionCount) 1423 , m_thisRegister(other.m_thisRegister) 1424 , m_argumentsRegister(other.m_argumentsRegister) 1425 , m_activationRegister(other.m_activationRegister) 1426 , m_needsFullScopeChain(other.m_needsFullScopeChain) 1427 , m_usesEval(other.m_usesEval) 1428 , m_isNumericCompareFunction(other.m_isNumericCompareFunction) 1429 , m_isStrictMode(other.m_isStrictMode) 1430 , m_codeType(other.m_codeType) 1431 , m_source(other.m_source) 1432 , m_sourceOffset(other.m_sourceOffset) 1433 , m_globalResolveInfos(other.m_globalResolveInfos) 1434 , m_jumpTargets(other.m_jumpTargets) 1435 , m_loopTargets(other.m_loopTargets) 1436 , m_identifiers(other.m_identifiers) 1437 , m_constantRegisters(other.m_constantRegisters) 1438 , m_functionDecls(other.m_functionDecls) 1439 , m_functionExprs(other.m_functionExprs) 1440 , m_symbolTable(symTab) 1441 , m_speculativeSuccessCounter(0) 1442 , m_speculativeFailCounter(0) 1443 , m_optimizationDelayCounter(0) 1444 , m_reoptimizationRetryCounter(0) 1445 { 1446 optimizeAfterWarmUp(); 1447 1448 if (other.m_rareData) { 1449 createRareDataIfNecessary(); 1450 1451 m_rareData->m_exceptionHandlers = other.m_rareData->m_exceptionHandlers; 1452 m_rareData->m_regexps = other.m_rareData->m_regexps; 1453 m_rareData->m_constantBuffers = other.m_rareData->m_constantBuffers; 1454 m_rareData->m_immediateSwitchJumpTables = other.m_rareData->m_immediateSwitchJumpTables; 1455 m_rareData->m_characterSwitchJumpTables = other.m_rareData->m_characterSwitchJumpTables; 1456 m_rareData->m_stringSwitchJumpTables = other.m_rareData->m_stringSwitchJumpTables; 1457 m_rareData->m_expressionInfo = other.m_rareData->m_expressionInfo; 1458 m_rareData->m_lineInfo = other.m_rareData->m_lineInfo; 1459 } 1460 } 1461 1410 1462 CodeBlock::CodeBlock(ScriptExecutable* ownerExecutable, CodeType codeType, JSGlobalObject *globalObject, PassRefPtr<SourceProvider> sourceProvider, unsigned sourceOffset, SymbolTable* symTab, bool isConstructor, PassOwnPtr<CodeBlock> alternative) 1411 1463 : m_globalObject(globalObject->globalData(), ownerExecutable, globalObject) … … 1415 1467 , m_numParameters(0) 1416 1468 , m_isConstructor(isConstructor) 1469 , m_shouldDiscardBytecode(false) 1417 1470 , m_ownerExecutable(globalObject->globalData(), ownerExecutable, ownerExecutable) 1418 1471 , m_globalData(0) … … 1596 1649 valueProfile(profileIndex)->computeUpdatedPrediction(); 1597 1650 #endif 1651 1652 #if ENABLE(JIT) && !ENABLE(OPCODE_SAMPLING) 1653 // Kill off some bytecode. We can't do it here because we don't want to accidentally 1654 // call into malloc while in stop-the-world GC mode. 1655 if (hasInstructions() && m_shouldDiscardBytecode) 1656 visitor.addUnconditionalFinalizer(this); 1657 #endif 1598 1658 } 1599 1659 … … 1822 1882 } 1823 1883 1824 void CodeBlock::copy DataFrom(CodeBlock* alternative)1884 void CodeBlock::copyPostParseDataFrom(CodeBlock* alternative) 1825 1885 { 1826 1886 if (!alternative) … … 1834 1894 } 1835 1895 1836 void CodeBlock::copy DataFromAlternative()1837 { 1838 copy DataFrom(m_alternative.get());1896 void CodeBlock::copyPostParseDataFromAlternative() 1897 { 1898 copyPostParseDataFrom(m_alternative.get()); 1839 1899 } 1840 1900 … … 1917 1977 } 1918 1978 #endif 1979 1980 void CodeBlock::finalizeUnconditionally() 1981 { 1982 #if ENABLE(OPCODE_SAMPLING) || !ENABLE(JIT) 1983 ASSERT_NOT_REACHED(); 1984 #endif 1985 ASSERT(m_shouldDiscardBytecode); 1986 discardBytecode(); 1987 } 1919 1988 1920 1989 #if ENABLE(VALUE_PROFILER)
Note:
See TracChangeset
for help on using the changeset viewer.