[JSC] Use metadata table to iterate specific bytecode metadata instead of propertyAcc...
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Sep 2019 21:38:17 +0000 (21:38 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Sep 2019 21:38:17 +0000 (21:38 +0000)
commit0d1c53138852e1e46863016b7b739889c22e111a
treee22a03200ab3e4ed3e310052192da1af5023e95d
parentc9b367b596059b057063335b7cfc7ba18fb207bb
[JSC] Use metadata table to iterate specific bytecode metadata instead of propertyAccessInstructions vector
https://bugs.webkit.org/show_bug.cgi?id=201613

Reviewed by Mark Lam.

We do not need to maintain propertyAccessInstructions vector to access metadata tied to a specific bytecode opcode
since we have MetadataTable::forEach<Op> feature. This removes propertyAccessInstructions entirely, and fixes the
issue that `op_create_promise` missed propertyAccessInstructions registration (a name "propertyAccessInstructions" is
misleading, it is like "instructions-requires-llint-finalize").

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::applyModification):
(JSC::UnlinkedCodeBlock::shrinkToFit):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::addPropertyAccessInstruction): Deleted.
(JSC::UnlinkedCodeBlock::numberOfPropertyAccessInstructions const): Deleted.
(JSC::UnlinkedCodeBlock::propertyAccessInstructions const): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitResolveScope):
(JSC::BytecodeGenerator::emitGetFromScope):
(JSC::BytecodeGenerator::emitPutToScope):
(JSC::BytecodeGenerator::emitGetById):
(JSC::BytecodeGenerator::emitDirectGetById):
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
(JSC::BytecodeGenerator::emitCreateThis):
(JSC::BytecodeGenerator::emitToThis):
* runtime/CachedTypes.cpp:
(JSC::CachedCodeBlock<CodeBlockType>::decode const):
(JSC::CachedCodeBlock<CodeBlockType>::encode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/stress/create-promise-finalize.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/runtime/CachedTypes.cpp