LLInt64 should have typed array fast paths for get_by_val
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2016 17:08:45 +0000 (17:08 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 May 2016 17:08:45 +0000 (17:08 +0000)
commit38ab28195915da432c7e90ffb5eea4eba5dcec5d
tree80b656aa0b7a4dc70032b345da230191870eba8e
parent365e9237e92380360291963af28b8bbd7bcc94ec
LLInt64 should have typed array fast paths for get_by_val
https://bugs.webkit.org/show_bug.cgi?id=157931

Reviewed by Keith Miller.

Source/JavaScriptCore:

I think that the LLInt should be able to access typed arrays more quickly than it does now.
Ideally we would have fast paths for every major typed array operation and we would use
inline cache optimizations. I don't want to do this all in one go, so my plan is to
incrementally add support for this as time allows.

This change just adds the easy typed array fast paths for get_by_val in the 64-bit version
of LLInt.

Another bug, https://bugs.webkit.org/show_bug.cgi?id=157922, tracks the overall task of
adding all typed array fast paths to both versions of the LLInt.

This is a 30% speed-up on typed array benchmarks in LLInt. This is not a speed-up when the
JITs are enabled.

* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LLIntOffsetsExtractor.cpp:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/backends.rb:
* runtime/JSArrayBufferView.h:
* runtime/JSType.h:

LayoutTests:

* js/regress/get_by_val-Int32Array-expected.txt: Added.
* js/regress/get_by_val-Int32Array.html: Added.
* js/regress/script-tests/get_by_val-Int32Array.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/js/regress/get_by_val-Int32Array-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/get_by_val-Int32Array.html [new file with mode: 0644]
LayoutTests/js/regress/script-tests/get_by_val-Int32Array.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/llint/LLIntData.cpp
Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp
Source/JavaScriptCore/llint/LowLevelInterpreter.asm
Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
Source/JavaScriptCore/offlineasm/backends.rb
Source/JavaScriptCore/runtime/JSArrayBufferView.h
Source/JavaScriptCore/runtime/JSType.h