Changeset 284690 in webkit for trunk/Source/JavaScriptCore/bytecompiler
- Timestamp:
- Oct 22, 2021, 9:36:49 AM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore/bytecompiler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r283168 r284690 149 149 } 150 150 151 ParserError BytecodeGenerator::generate( )151 ParserError BytecodeGenerator::generate(unsigned& size) 152 152 { 153 153 if (UNLIKELY(m_outOfMemoryDuringConstruction)) … … 286 286 287 287 RELEASE_ASSERT(m_codeBlock->numCalleeLocals() < static_cast<unsigned>(FirstConstantRegisterIndex)); 288 size = instructions().size(); 288 289 m_codeBlock->finalize(m_writer.finalize()); 289 290 if (m_expressionTooDeep) -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r284435 r284690 385 385 DeferGC deferGC(vm.heap); 386 386 auto bytecodeGenerator = makeUnique<BytecodeGenerator>(vm, node, unlinkedCodeBlock, codeGenerationMode, parentScopeTDZVariables, privateNameEnvironment); 387 auto result = bytecodeGenerator->generate(); 387 unsigned size; 388 auto result = bytecodeGenerator->generate(size); 388 389 389 390 if (UNLIKELY(Options::reportBytecodeCompileTimes())) { 390 391 MonotonicTime after = MonotonicTime::now(); 391 dataLogLn(result.isValid() ? "Failed to compile #" : "Compiled #", CodeBlockHash(sourceCode, unlinkedCodeBlock->isConstructor() ? CodeForConstruct : CodeForCall), " into bytecode ", bytecodeGenerator->instructions().size(), " instructions in ", (after - before).milliseconds(), " ms.");392 dataLogLn(result.isValid() ? "Failed to compile #" : "Compiled #", CodeBlockHash(sourceCode, unlinkedCodeBlock->isConstructor() ? CodeForConstruct : CodeForCall), " into bytecode ", size, " instructions in ", (after - before).milliseconds(), " ms."); 392 393 } 393 394 return result; … … 1075 1076 1076 1077 private: 1077 ParserError generate( );1078 ParserError generate(unsigned&); 1078 1079 Variable variableForLocalEntry(const Identifier&, const SymbolTableEntry&, int symbolTableConstantIndex, bool isLexicallyScoped); 1079 1080
Note:
See TracChangeset
for help on using the changeset viewer.