[JSC] Use branchIfString/branchIfNotString instead of structure checkings
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2018 04:44:44 +0000 (04:44 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 May 2018 04:44:44 +0000 (04:44 +0000)
commit6af29fb6bda2c7b8264eb251d0be0157fafd5f07
tree06a122673f8027bf2b4456be545458a9eda02c31
parent0631f4ae3026f6a506c63eaf5525111eb83afa5f
[JSC] Use branchIfString/branchIfNotString instead of structure checkings
https://bugs.webkit.org/show_bug.cgi?id=185810

Reviewed by Saam Barati.

Let's use branchIfString/branchIfNotString helper functions instead of
checking structure with jsString's structure. It's easy to read. And
it emits less code since we do not need to embed string structure's
raw pointer in 32bit environment.

* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::emitLoadCharacterString):
(JSC::JIT::checkStructure): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::compileOpEqJumpSlow):
(JSC::JIT::emitSlow_op_neq):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emitByValIdentifierCheck):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::emitSlow_op_get_by_val):
* jit/JSInterfaceJIT.h:
(JSC::ThunkHelpers::jsStringLengthOffset): Deleted.
(JSC::ThunkHelpers::jsStringValueOffset): Deleted.
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::loadJSStringArgument):
* jit/ThunkGenerators.cpp:
(JSC::stringCharLoad):
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
* runtime/JSString.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JIT.h
Source/JavaScriptCore/jit/JITInlines.h
Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
Source/JavaScriptCore/jit/JITPropertyAccess.cpp
Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
Source/JavaScriptCore/jit/JSInterfaceJIT.h
Source/JavaScriptCore/jit/SpecializedThunkJIT.h
Source/JavaScriptCore/jit/ThunkGenerators.cpp
Source/JavaScriptCore/runtime/JSString.h