Baseline JIT should use structure watchpoints whenever possible
https://bugs.webkit.org/show_bug.cgi?id=101146
Reviewed by Sam Weinig.
No speed-up yet except on toy programs. I think that it will start to show
speed-ups with https://bugs.webkit.org/show_bug.cgi?id=101147, which this is
a step towards.
* jit/JIT.h:
(JIT):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
(JSC::JIT::addStructureTransitionCheck):
(JSC):
(JSC::JIT::testPrototype):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::privateCompilePutByIdTransition):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h
index aa8a007..44c74a6 100644
--- a/Source/JavaScriptCore/jit/JIT.h
+++ b/Source/JavaScriptCore/jit/JIT.h
@@ -428,6 +428,7 @@
void privateCompileLinkPass();
void privateCompileSlowCases();
JITCode privateCompile(CodePtr* functionEntryArityCheck, JITCompilationEffort);
+
void privateCompileGetByIdProto(StructureStubInfo*, Structure*, Structure* prototypeStructure, const Identifier&, const PropertySlot&, PropertyOffset cachedOffset, ReturnAddressPtr, CallFrame*);
void privateCompileGetByIdSelfList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, const Identifier&, const PropertySlot&, PropertyOffset cachedOffset);
void privateCompileGetByIdProtoList(StructureStubInfo*, PolymorphicAccessStructureList*, int, Structure*, Structure* prototypeStructure, const Identifier&, const PropertySlot&, PropertyOffset cachedOffset, CallFrame*);
@@ -466,7 +467,9 @@
Jump emitJumpIfNotObject(RegisterID structureReg);
Jump emitJumpIfNotType(RegisterID baseReg, RegisterID scratchReg, JSType);
- void testPrototype(JSValue, JumpList& failureCases);
+ Jump addStructureTransitionCheck(JSCell*, Structure*, StructureStubInfo*, RegisterID scratch);
+ void addStructureTransitionCheck(JSCell*, Structure*, StructureStubInfo*, JumpList& failureCases, RegisterID scratch);
+ void testPrototype(JSValue, JumpList& failureCases, StructureStubInfo*);
enum WriteBarrierMode { UnconditionalWriteBarrier, ShouldFilterImmediates };
// value register in write barrier is used before any scratch registers