B3 should be able to compile a program with Switch
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Nov 2015 04:08:46 +0000 (04:08 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Nov 2015 04:08:46 +0000 (04:08 +0000)
commit9358062be703b67b7014e7aadf32c7f257af4be5
tree45d0b7f9559ca4f3d2ad4f99c94309a0b0feeb51
parent10b19f91c3264564f30a87fa204a8aa87a5303b3
B3 should be able to compile a program with Switch
https://bugs.webkit.org/show_bug.cgi?id=151115

Reviewed by Benjamin Poulain.

Adds lowering of Switch to a binary switch. This doesn't require any Air support.

* b3/B3BasicBlock.cpp:
(JSC::B3::BasicBlock::append):
(JSC::B3::BasicBlock::removeLast):
(JSC::B3::BasicBlock::replaceLast):
* b3/B3BasicBlock.h:
* b3/B3BlockInsertionSet.cpp:
(JSC::B3::BlockInsertionSet::insertBefore):
(JSC::B3::BlockInsertionSet::insertAfter):
(JSC::B3::BlockInsertionSet::splitForward):
* b3/B3BlockInsertionSet.h:
* b3/B3ControlValue.h:
* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3LowerMacros.cpp:
* b3/B3SwitchValue.cpp:
(JSC::B3::SwitchValue::dumpMeta):
(JSC::B3::SwitchValue::SwitchValue):
* b3/B3SwitchValue.h:
* b3/testb3.cpp:
(JSC::B3::testChillDiv64):
(JSC::B3::testSwitch):
(JSC::B3::run):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/b3/B3BasicBlock.cpp
Source/JavaScriptCore/b3/B3BasicBlock.h
Source/JavaScriptCore/b3/B3BlockInsertionSet.cpp
Source/JavaScriptCore/b3/B3BlockInsertionSet.h
Source/JavaScriptCore/b3/B3ControlValue.h
Source/JavaScriptCore/b3/B3Generate.cpp
Source/JavaScriptCore/b3/B3LowerMacros.cpp
Source/JavaScriptCore/b3/B3SwitchValue.cpp
Source/JavaScriptCore/b3/B3SwitchValue.h
Source/JavaScriptCore/b3/testb3.cpp