Clients of PolymorphicAccess::addCases shouldn't have to malloc
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 21:26:52 +0000 (21:26 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 21:26:52 +0000 (21:26 +0000)
commit3f17df53c42a9a944f047eeea467acdc93baaf9e
tree82c376a5857d6dccd9f5a1fbe2f504c4c428ea0d
parent61ee049ee29bf873b2d7c27326d29503692d53a2
Clients of PolymorphicAccess::addCases shouldn't have to malloc
https://bugs.webkit.org/show_bug.cgi?id=158357

Reviewed by Keith Miller.

We only ever have 1 or 2 cases, so we can use inline Vector capacity.

This shows up a little in the JSBench profile.

* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::addCases):
(JSC::PolymorphicAccess::addCase):
* bytecode/PolymorphicAccess.h:
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::addAccessCase):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
Source/JavaScriptCore/bytecode/PolymorphicAccess.h
Source/JavaScriptCore/bytecode/StructureStubInfo.cpp