op_is_foo should be optimized
https://bugs.webkit.org/show_bug.cgi?id=83666
Reviewed by Gavin Barraclough.
This implements inlining of op_is_undefined, op_is_string, op_is_number,
and op_is_boolean in LLInt and the baseline JIT. op_is_object and
op_is_function are not inlined because they are quite a bit more complex.
This also implements all of the op_is_foo opcodes in the DFG, but it does
not do any type profiling based optimizations, yet.
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::compare8):
(MacroAssemblerARMv7):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::compare8):
(MacroAssemblerX86Common):
* assembler/MacroAssemblerX86_64.h:
(MacroAssemblerX86_64):
(JSC::MacroAssemblerX86_64::testPtr):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCCallHelpers.h:
(JSC::DFG::CCallHelpers::setupArguments):
(CCallHelpers):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGCapabilities.h:
(JSC::DFG::canCompileOpcode):
* dfg/DFGNodeType.h:
(DFG):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::appendCallSetResult):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
(JIT):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_is_undefined):
(JSC):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_string):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_is_undefined):
(JSC):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_string):
* jit/JITStubs.cpp:
(JSC):
* llint/LLIntSlowPaths.cpp:
(LLInt):
* llint/LLIntSlowPaths.h:
(LLInt):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/armv7.rb:
* offlineasm/instructions.rb:
* offlineasm/x86.rb:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/offlineasm/instructions.rb b/Source/JavaScriptCore/offlineasm/instructions.rb
index cc7e0c6..67cec6d 100644
--- a/Source/JavaScriptCore/offlineasm/instructions.rb
+++ b/Source/JavaScriptCore/offlineasm/instructions.rb
@@ -133,6 +133,16 @@
"break",
"call",
"ret",
+ "cbeq",
+ "cbneq",
+ "cba",
+ "cbaeq",
+ "cbb",
+ "cbbeq",
+ "cbgt",
+ "cbgteq",
+ "cblt",
+ "cblteq",
"cieq",
"cineq",
"cia",
@@ -151,6 +161,10 @@
"tbs",
"tbz",
"tbnz",
+ "tpo",
+ "tps",
+ "tpz",
+ "tpnz",
"peek",
"poke",
"bpeq",