Skip to content

Commit da35b6e

Browse files
author
Filip Pizlo
committed
JSC should use a shadow stack version of CHICKEN so that debuggers have the option of retrieving tail-deleted frames
https://bugs.webkit.org/show_bug.cgi?id=155598 Reviewed by Saam Barati. PerformanceTests/SunSpider: * shadow-chicken.yaml: Added. Source/JavaScriptCore: JSC is the first JSVM to have proper tail calls. This means that error.stack and the debugger will appear to "delete" strict mode stack frames, if the call that this frame made was in tail position. This is exactly what functional programmers expect - they don't want the VM to waste resources on tail-deleted frames to ensure that it's legal to loop forever using tail calls. It's also something that non-functional programmers fear. It's not clear that tail-deleted frames would actually degrade the debugging experience, but the fear is real, so it's worthwhile to do something about it. It turns out that there is at least one tail call implementation that doesn't suffer from this problem. It implements proper tail calls in the sense that you won't run out of memory by tail-looping. It also has the power to show you tail-deleted frames in a backtrace, so long as you haven't yet run out of memory. It's called CHICKEN Scheme, and it's one of my favorite hacks: http://www.more-magic.net/posts/internals-gc.html CHICKEN does many awesome things. The intuition from CHICKEN that we use here is a simple one: what if a tail call still kept the tail-deleted frame, and the GC actually deleted that frame only once we proved that there was insufficient memory to keep it around. CHICKEN does this by reshaping the C stack with longjmp/setjmp. We can't do that because we can have arbitrary native code, and that native code does not have relocatable stack frames. But we can do something almost like CHICKEN on a shadow stack. It's a common trick to have a VM maintain two stacks - the actual execution stack plus a shadow stack that has some extra information. The shadow stack can be reshaped, moved, etc, since the VM tightly controls its layout. The main stack can then continue to obey ABI rules. This patch implements a mechanism for being able to display stack traces that include tail-deleted frames. It uses a shadow stack that behaves like a CHICKEN stack: it has all frames all the time, though we will collect the tail-deleted ones if the stack gets too big. This new mechanism is called ShadowChicken, obviously: it's CHICKEN on a shadow stack. ShadowChicken is always on, but individual CodeBlocks may make their own choices about whether to opt into it. They will do that at bytecompile time based on the debugger mode on their global object. When no CodeBlock opts in, there is no overhead, since ShadowChicken ends up doing nothing in that case. Well, except when exceptions are thrown. Then it might do some work, but it's minor. When all CodeBlocks opt in, there is about 6% overhead. That's too much overhead to enable this all the time, but it's low enough to justify enabling in the Inspector. It's currently enabled on all CodeBlocks only when you use an Option. Otherwise it will auto-enable if the debugger is on. Note that ShadowChicken attempts to gracefully handle the presence of stack frames that have no logging. This is essential since we *can* have debugging enabled in one GlobalObject and disabled in another. Also, some frames don't do ShadowChicken because they just haven't been hacked to do it yet. Native frames fall into this category, as do the VM entry frames. This doesn't yet wire ShadowChicken into DebuggerCallFrame. That will take more work. It just makes a ShadowChicken stack walk function available to jsc. It's used from the shadow-chicken tests. * API/JSContextRef.cpp: (BacktraceFunctor::BacktraceFunctor): (BacktraceFunctor::operator()): (JSContextCreateBacktrace): * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * bytecode/BytecodeList.json: * bytecode/BytecodeUseDef.h: (JSC::computeUsesForBytecodeOffset): (JSC::computeDefsForBytecodeOffset): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dumpBytecode): (JSC::RecursionCheckFunctor::RecursionCheckFunctor): (JSC::RecursionCheckFunctor::operator()): (JSC::CodeBlock::noticeIncomingCall): * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitEnter): (JSC::BytecodeGenerator::emitCallInTailPosition): (JSC::BytecodeGenerator::emitCallVarargsInTailPosition): (JSC::BytecodeGenerator::emitCallVarargs): (JSC::BytecodeGenerator::emitLogShadowChickenPrologueIfNecessary): (JSC::BytecodeGenerator::emitLogShadowChickenTailIfNecessary): (JSC::BytecodeGenerator::emitCallDefineProperty): * bytecompiler/BytecodeGenerator.h: * debugger/DebuggerCallFrame.cpp: (JSC::LineAndColumnFunctor::operator()): (JSC::LineAndColumnFunctor::column): (JSC::FindCallerMidStackFunctor::FindCallerMidStackFunctor): (JSC::FindCallerMidStackFunctor::operator()): (JSC::DebuggerCallFrame::DebuggerCallFrame): * dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::parseBlock): * dfg/DFGClobberize.h: (JSC::DFG::clobberize): * dfg/DFGDoesGC.cpp: (JSC::DFG::doesGC): * dfg/DFGFixupPhase.cpp: (JSC::DFG::FixupPhase::fixupNode): * dfg/DFGNodeType.h: * dfg/DFGPredictionPropagationPhase.cpp: (JSC::DFG::PredictionPropagationPhase::propagate): * dfg/DFGSafeToExecute.h: (JSC::DFG::safeToExecute): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): * ftl/FTLAbstractHeapRepository.cpp: * ftl/FTLAbstractHeapRepository.h: * ftl/FTLCapabilities.cpp: (JSC::FTL::canCompile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileNode): (JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex): (JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenPrologue): (JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenTail): (JSC::FTL::DFG::LowerDFGToB3::didOverflowStack): (JSC::FTL::DFG::LowerDFGToB3::allocateJSArray): (JSC::FTL::DFG::LowerDFGToB3::setupShadowChickenPacket): (JSC::FTL::DFG::LowerDFGToB3::boolify): * heap/Heap.cpp: (JSC::Heap::markRoots): (JSC::Heap::visitSamplingProfiler): (JSC::Heap::visitShadowChicken): (JSC::Heap::traceCodeBlocksAndJITStubRoutines): (JSC::Heap::collectImpl): * heap/Heap.h: * inspector/ScriptCallStackFactory.cpp: (Inspector::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor): (Inspector::CreateScriptCallStackFunctor::operator()): (Inspector::createScriptCallStack): * interpreter/CallFrame.h: (JSC::ExecState::iterate): * interpreter/Interpreter.cpp: (JSC::DumpRegisterFunctor::DumpRegisterFunctor): (JSC::DumpRegisterFunctor::operator()): (JSC::GetStackTraceFunctor::GetStackTraceFunctor): (JSC::GetStackTraceFunctor::operator()): (JSC::Interpreter::getStackTrace): (JSC::GetCatchHandlerFunctor::handler): (JSC::GetCatchHandlerFunctor::operator()): (JSC::notifyDebuggerOfUnwinding): (JSC::UnwindFunctor::UnwindFunctor): (JSC::UnwindFunctor::operator()): (JSC::UnwindFunctor::copyCalleeSavesToVMCalleeSavesBuffer): * interpreter/ShadowChicken.cpp: Added. (JSC::ShadowChicken::Packet::dump): (JSC::ShadowChicken::Frame::dump): (JSC::ShadowChicken::ShadowChicken): (JSC::ShadowChicken::~ShadowChicken): (JSC::ShadowChicken::log): (JSC::ShadowChicken::update): (JSC::ShadowChicken::visitChildren): (JSC::ShadowChicken::reset): (JSC::ShadowChicken::dump): (JSC::ShadowChicken::functionsOnStack): * interpreter/ShadowChicken.h: Added. (JSC::ShadowChicken::Packet::Packet): (JSC::ShadowChicken::Packet::tailMarker): (JSC::ShadowChicken::Packet::throwMarker): (JSC::ShadowChicken::Packet::prologue): (JSC::ShadowChicken::Packet::tail): (JSC::ShadowChicken::Packet::throwPacket): (JSC::ShadowChicken::Packet::operator bool): (JSC::ShadowChicken::Packet::isPrologue): (JSC::ShadowChicken::Packet::isTail): (JSC::ShadowChicken::Packet::isThrow): (JSC::ShadowChicken::Frame::Frame): (JSC::ShadowChicken::Frame::operator==): (JSC::ShadowChicken::Frame::operator!=): (JSC::ShadowChicken::log): (JSC::ShadowChicken::logSize): (JSC::ShadowChicken::addressOfLogCursor): (JSC::ShadowChicken::logEnd): * interpreter/ShadowChickenInlines.h: Added. (JSC::ShadowChicken::iterate): * interpreter/StackVisitor.h: (JSC::StackVisitor::Frame::callee): (JSC::StackVisitor::Frame::codeBlock): (JSC::StackVisitor::Frame::bytecodeOffset): (JSC::StackVisitor::Frame::inlineCallFrame): (JSC::StackVisitor::Frame::isJSFrame): (JSC::StackVisitor::Frame::isInlinedFrame): (JSC::StackVisitor::visit): * jit/CCallHelpers.cpp: Added. (JSC::CCallHelpers::logShadowChickenProloguePacket): (JSC::CCallHelpers::logShadowChickenTailPacket): (JSC::CCallHelpers::setupShadowChickenPacket): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): * jit/JIT.h: * jit/JITExceptions.cpp: (JSC::genericUnwind): * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_resume): (JSC::JIT::emit_op_log_shadow_chicken_prologue): (JSC::JIT::emit_op_log_shadow_chicken_tail): * jit/JITOperations.cpp: * jit/JITOperations.h: * jsc.cpp: (GlobalObject::finishCreation): (FunctionJSCStackFunctor::FunctionJSCStackFunctor): (FunctionJSCStackFunctor::operator()): (functionClearSamplingFlags): (functionShadowChickenFunctionsOnStack): (functionReadline): * llint/LLIntOffsetsExtractor.cpp: * llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL): (JSC::LLInt::llint_throw_stack_overflow_error): * llint/LLIntSlowPaths.h: * llint/LowLevelInterpreter.asm: * profiler/ProfileGenerator.cpp: (JSC::AddParentForConsoleStartFunctor::foundParent): (JSC::AddParentForConsoleStartFunctor::operator()): * runtime/Error.cpp: (JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor): (JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()): (JSC::addErrorInfoAndGetBytecodeOffset): * runtime/JSFunction.cpp: (JSC::RetrieveArgumentsFunctor::result): (JSC::RetrieveArgumentsFunctor::operator()): (JSC::retrieveArguments): (JSC::RetrieveCallerFunctionFunctor::result): (JSC::RetrieveCallerFunctionFunctor::operator()): (JSC::retrieveCallerFunction): * runtime/JSGlobalObjectFunctions.cpp: (JSC::GlobalFuncProtoGetterFunctor::result): (JSC::GlobalFuncProtoGetterFunctor::operator()): (JSC::globalFuncProtoGetter): (JSC::GlobalFuncProtoSetterFunctor::allowsAccess): (JSC::GlobalFuncProtoSetterFunctor::operator()): * runtime/NullSetterFunction.cpp: (JSC::GetCallerStrictnessFunctor::GetCallerStrictnessFunctor): (JSC::GetCallerStrictnessFunctor::operator()): (JSC::GetCallerStrictnessFunctor::callerIsStrict): (JSC::callerIsStrict): * runtime/ObjectConstructor.cpp: (JSC::ObjectConstructorGetPrototypeOfFunctor::result): (JSC::ObjectConstructorGetPrototypeOfFunctor::operator()): (JSC::objectConstructorGetPrototypeOf): * runtime/Options.h: * runtime/VM.cpp: (JSC::VM::VM): (JSC::SetEnabledProfilerFunctor::operator()): * runtime/VM.h: (JSC::VM::shouldBuilderPCToCodeOriginMapping): (JSC::VM::bytecodeIntrinsicRegistry): (JSC::VM::shadowChicken): * tests/stress/resources/shadow-chicken-support.js: Added. (describeFunction): (describeArray): (expectStack): (initialize): * tests/stress/shadow-chicken-disabled.js: Added. (test1.foo): (test1.bar): (test1.baz): (test1): (test2.foo): (test2.bar): (test2.baz): (test2): (test3.foo): (test3.bar): (test3.baz): (test3): * tests/stress/shadow-chicken-enabled.js: Added. (test1.foo): (test1.bar): (test1.baz): (test1): (test2.foo): (test2.bar): (test2.baz): (test2): (test3.bob): (test3.thingy): (test3.foo): (test3.bar): (test3.baz): (test3): (test4.bob): (test4.thingy): (test4.foo): (test4.bar): (test4.baz): (test4): (test5.foo): (test5): * tools/JSDollarVMPrototype.cpp: (JSC::CallerFrameJITTypeFunctor::CallerFrameJITTypeFunctor): (JSC::CallerFrameJITTypeFunctor::operator()): (JSC::CallerFrameJITTypeFunctor::jitType): (JSC::functionLLintTrue): (JSC::CellAddressCheckFunctor::CellAddressCheckFunctor): (JSC::CellAddressCheckFunctor::operator()): (JSC::JSDollarVMPrototype::isValidCell): (JSC::JSDollarVMPrototype::isValidCodeBlock): (JSC::JSDollarVMPrototype::codeBlockForFrame): (JSC::PrintFrameFunctor::PrintFrameFunctor): (JSC::PrintFrameFunctor::operator()): (JSC::printCallFrame): Source/WebCore: Fixed some uses of the stack walking functor to obey the new lambda-friendly API, which requires that operator() is const. No new tests because no change in behavior. * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::SendFunctor::column): (WebCore::SendFunctor::url): (WebCore::SendFunctor::operator()): (WebCore::JSXMLHttpRequest::send): * testing/Internals.cpp: (WebCore::GetCallerCodeBlockFunctor::GetCallerCodeBlockFunctor): (WebCore::GetCallerCodeBlockFunctor::operator()): (WebCore::GetCallerCodeBlockFunctor::codeBlock): (WebCore::Internals::parserMetaData): Canonical link: https://commits.webkit.org/174349@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent cb43fa6 commit da35b6e

File tree

72 files changed

+1911
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1911
-130
lines changed

PerformanceTests/SunSpider/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2016-03-21 Filip Pizlo <fpizlo@apple.com>
2+
3+
JSC should use a shadow stack version of CHICKEN so that debuggers have the option of retrieving tail-deleted frames
4+
https://bugs.webkit.org/show_bug.cgi?id=155598
5+
6+
Reviewed by Saam Barati.
7+
8+
* shadow-chicken.yaml: Added.
9+
110
2015-03-30 Michael Saboff <msaboff@apple.com>
211

312
Fix failing v8-deltablue.js for ARM
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (C) 2013 Apple Inc. All rights reserved.
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions
5+
# are met:
6+
#
7+
# 1. Redistributions of source code must retain the above copyright
8+
# notice, this list of conditions and the following disclaimer.
9+
# 2. Redistributions in binary form must reproduce the above copyright
10+
# notice, this list of conditions and the following disclaimer in the
11+
# documentation and/or other materials provided with the distribution.
12+
#
13+
# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
14+
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16+
# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
17+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22+
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23+
24+
# Tests SunSpider with architecture-specific optimizations disabled. This is
25+
# just here so you can't get away with murder when dealing with the generic
26+
# (i.e. no ASO) paths. You should still likely actually *test* all of the
27+
# architectures you care about.
28+
29+
- path: tests/sunspider-1.0
30+
cmd: runShadowChicken
31+
32+
- path: tests/v8-v6
33+
cmd: runShadowChicken
34+

Source/JavaScriptCore/API/JSContextRef.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2006, 2007, 2013 Apple Inc. All rights reserved.
2+
* Copyright (C) 2006, 2007, 2013, 2016 Apple Inc. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -255,7 +255,7 @@ class BacktraceFunctor {
255255
{
256256
}
257257

258-
StackVisitor::Status operator()(StackVisitor& visitor)
258+
StackVisitor::Status operator()(StackVisitor& visitor) const
259259
{
260260
if (m_remainingCapacityForFrameCapture) {
261261
// If callee is unknown, but we've not added any frame yet, we should
@@ -292,7 +292,7 @@ class BacktraceFunctor {
292292

293293
private:
294294
StringBuilder& m_builder;
295-
unsigned m_remainingCapacityForFrameCapture;
295+
mutable unsigned m_remainingCapacityForFrameCapture;
296296
};
297297

298298
JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize)

Source/JavaScriptCore/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,12 @@ set(JavaScriptCore_SOURCES
507507
interpreter/Interpreter.cpp
508508
interpreter/JSStack.cpp
509509
interpreter/ProtoCallFrame.cpp
510+
interpreter/ShadowChicken.cpp
510511
interpreter/StackVisitor.cpp
511512

512513
jit/AssemblyHelpers.cpp
513514
jit/BinarySwitch.cpp
515+
jit/CCallHelpers.cpp
514516
jit/CachedRecovery.cpp
515517
jit/CallFrameShuffleData.cpp
516518
jit/CallFrameShuffler.cpp

Source/JavaScriptCore/ChangeLog

Lines changed: 310 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,313 @@
1+
2016-03-18 Filip Pizlo <fpizlo@apple.com>
2+
3+
JSC should use a shadow stack version of CHICKEN so that debuggers have the option of retrieving tail-deleted frames
4+
https://bugs.webkit.org/show_bug.cgi?id=155598
5+
6+
Reviewed by Saam Barati.
7+
8+
JSC is the first JSVM to have proper tail calls. This means that error.stack and the
9+
debugger will appear to "delete" strict mode stack frames, if the call that this frame made
10+
was in tail position. This is exactly what functional programmers expect - they don't want
11+
the VM to waste resources on tail-deleted frames to ensure that it's legal to loop forever
12+
using tail calls. It's also something that non-functional programmers fear. It's not clear
13+
that tail-deleted frames would actually degrade the debugging experience, but the fear is
14+
real, so it's worthwhile to do something about it.
15+
16+
It turns out that there is at least one tail call implementation that doesn't suffer from
17+
this problem. It implements proper tail calls in the sense that you won't run out of memory
18+
by tail-looping. It also has the power to show you tail-deleted frames in a backtrace, so
19+
long as you haven't yet run out of memory. It's called CHICKEN Scheme, and it's one of my
20+
favorite hacks:
21+
22+
http://www.more-magic.net/posts/internals-gc.html
23+
24+
CHICKEN does many awesome things. The intuition from CHICKEN that we use here is a simple
25+
one: what if a tail call still kept the tail-deleted frame, and the GC actually deleted that
26+
frame only once we proved that there was insufficient memory to keep it around.
27+
28+
CHICKEN does this by reshaping the C stack with longjmp/setjmp. We can't do that because we
29+
can have arbitrary native code, and that native code does not have relocatable stack frames.
30+
31+
But we can do something almost like CHICKEN on a shadow stack. It's a common trick to have a
32+
VM maintain two stacks - the actual execution stack plus a shadow stack that has some extra
33+
information. The shadow stack can be reshaped, moved, etc, since the VM tightly controls its
34+
layout. The main stack can then continue to obey ABI rules.
35+
36+
This patch implements a mechanism for being able to display stack traces that include
37+
tail-deleted frames. It uses a shadow stack that behaves like a CHICKEN stack: it has all
38+
frames all the time, though we will collect the tail-deleted ones if the stack gets too big.
39+
This new mechanism is called ShadowChicken, obviously: it's CHICKEN on a shadow stack.
40+
41+
ShadowChicken is always on, but individual CodeBlocks may make their own choices about
42+
whether to opt into it. They will do that at bytecompile time based on the debugger mode on
43+
their global object.
44+
45+
When no CodeBlock opts in, there is no overhead, since ShadowChicken ends up doing nothing
46+
in that case. Well, except when exceptions are thrown. Then it might do some work, but it's
47+
minor.
48+
49+
When all CodeBlocks opt in, there is about 6% overhead. That's too much overhead to enable
50+
this all the time, but it's low enough to justify enabling in the Inspector. It's currently
51+
enabled on all CodeBlocks only when you use an Option. Otherwise it will auto-enable if the
52+
debugger is on.
53+
54+
Note that ShadowChicken attempts to gracefully handle the presence of stack frames that have
55+
no logging. This is essential since we *can* have debugging enabled in one GlobalObject and
56+
disabled in another. Also, some frames don't do ShadowChicken because they just haven't been
57+
hacked to do it yet. Native frames fall into this category, as do the VM entry frames.
58+
59+
This doesn't yet wire ShadowChicken into DebuggerCallFrame. That will take more work. It
60+
just makes a ShadowChicken stack walk function available to jsc. It's used from the
61+
shadow-chicken tests.
62+
63+
* API/JSContextRef.cpp:
64+
(BacktraceFunctor::BacktraceFunctor):
65+
(BacktraceFunctor::operator()):
66+
(JSContextCreateBacktrace):
67+
* CMakeLists.txt:
68+
* JavaScriptCore.xcodeproj/project.pbxproj:
69+
* bytecode/BytecodeList.json:
70+
* bytecode/BytecodeUseDef.h:
71+
(JSC::computeUsesForBytecodeOffset):
72+
(JSC::computeDefsForBytecodeOffset):
73+
* bytecode/CodeBlock.cpp:
74+
(JSC::CodeBlock::dumpBytecode):
75+
(JSC::RecursionCheckFunctor::RecursionCheckFunctor):
76+
(JSC::RecursionCheckFunctor::operator()):
77+
(JSC::CodeBlock::noticeIncomingCall):
78+
* bytecompiler/BytecodeGenerator.cpp:
79+
(JSC::BytecodeGenerator::emitEnter):
80+
(JSC::BytecodeGenerator::emitCallInTailPosition):
81+
(JSC::BytecodeGenerator::emitCallVarargsInTailPosition):
82+
(JSC::BytecodeGenerator::emitCallVarargs):
83+
(JSC::BytecodeGenerator::emitLogShadowChickenPrologueIfNecessary):
84+
(JSC::BytecodeGenerator::emitLogShadowChickenTailIfNecessary):
85+
(JSC::BytecodeGenerator::emitCallDefineProperty):
86+
* bytecompiler/BytecodeGenerator.h:
87+
* debugger/DebuggerCallFrame.cpp:
88+
(JSC::LineAndColumnFunctor::operator()):
89+
(JSC::LineAndColumnFunctor::column):
90+
(JSC::FindCallerMidStackFunctor::FindCallerMidStackFunctor):
91+
(JSC::FindCallerMidStackFunctor::operator()):
92+
(JSC::DebuggerCallFrame::DebuggerCallFrame):
93+
* dfg/DFGAbstractInterpreterInlines.h:
94+
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
95+
* dfg/DFGByteCodeParser.cpp:
96+
(JSC::DFG::ByteCodeParser::parseBlock):
97+
* dfg/DFGClobberize.h:
98+
(JSC::DFG::clobberize):
99+
* dfg/DFGDoesGC.cpp:
100+
(JSC::DFG::doesGC):
101+
* dfg/DFGFixupPhase.cpp:
102+
(JSC::DFG::FixupPhase::fixupNode):
103+
* dfg/DFGNodeType.h:
104+
* dfg/DFGPredictionPropagationPhase.cpp:
105+
(JSC::DFG::PredictionPropagationPhase::propagate):
106+
* dfg/DFGSafeToExecute.h:
107+
(JSC::DFG::safeToExecute):
108+
* dfg/DFGSpeculativeJIT32_64.cpp:
109+
(JSC::DFG::SpeculativeJIT::compile):
110+
* dfg/DFGSpeculativeJIT64.cpp:
111+
(JSC::DFG::SpeculativeJIT::compile):
112+
* ftl/FTLAbstractHeapRepository.cpp:
113+
* ftl/FTLAbstractHeapRepository.h:
114+
* ftl/FTLCapabilities.cpp:
115+
(JSC::FTL::canCompile):
116+
* ftl/FTLLowerDFGToB3.cpp:
117+
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
118+
(JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex):
119+
(JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenPrologue):
120+
(JSC::FTL::DFG::LowerDFGToB3::compileLogShadowChickenTail):
121+
(JSC::FTL::DFG::LowerDFGToB3::didOverflowStack):
122+
(JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):
123+
(JSC::FTL::DFG::LowerDFGToB3::setupShadowChickenPacket):
124+
(JSC::FTL::DFG::LowerDFGToB3::boolify):
125+
* heap/Heap.cpp:
126+
(JSC::Heap::markRoots):
127+
(JSC::Heap::visitSamplingProfiler):
128+
(JSC::Heap::visitShadowChicken):
129+
(JSC::Heap::traceCodeBlocksAndJITStubRoutines):
130+
(JSC::Heap::collectImpl):
131+
* heap/Heap.h:
132+
* inspector/ScriptCallStackFactory.cpp:
133+
(Inspector::CreateScriptCallStackFunctor::CreateScriptCallStackFunctor):
134+
(Inspector::CreateScriptCallStackFunctor::operator()):
135+
(Inspector::createScriptCallStack):
136+
* interpreter/CallFrame.h:
137+
(JSC::ExecState::iterate):
138+
* interpreter/Interpreter.cpp:
139+
(JSC::DumpRegisterFunctor::DumpRegisterFunctor):
140+
(JSC::DumpRegisterFunctor::operator()):
141+
(JSC::GetStackTraceFunctor::GetStackTraceFunctor):
142+
(JSC::GetStackTraceFunctor::operator()):
143+
(JSC::Interpreter::getStackTrace):
144+
(JSC::GetCatchHandlerFunctor::handler):
145+
(JSC::GetCatchHandlerFunctor::operator()):
146+
(JSC::notifyDebuggerOfUnwinding):
147+
(JSC::UnwindFunctor::UnwindFunctor):
148+
(JSC::UnwindFunctor::operator()):
149+
(JSC::UnwindFunctor::copyCalleeSavesToVMCalleeSavesBuffer):
150+
* interpreter/ShadowChicken.cpp: Added.
151+
(JSC::ShadowChicken::Packet::dump):
152+
(JSC::ShadowChicken::Frame::dump):
153+
(JSC::ShadowChicken::ShadowChicken):
154+
(JSC::ShadowChicken::~ShadowChicken):
155+
(JSC::ShadowChicken::log):
156+
(JSC::ShadowChicken::update):
157+
(JSC::ShadowChicken::visitChildren):
158+
(JSC::ShadowChicken::reset):
159+
(JSC::ShadowChicken::dump):
160+
(JSC::ShadowChicken::functionsOnStack):
161+
* interpreter/ShadowChicken.h: Added.
162+
(JSC::ShadowChicken::Packet::Packet):
163+
(JSC::ShadowChicken::Packet::tailMarker):
164+
(JSC::ShadowChicken::Packet::throwMarker):
165+
(JSC::ShadowChicken::Packet::prologue):
166+
(JSC::ShadowChicken::Packet::tail):
167+
(JSC::ShadowChicken::Packet::throwPacket):
168+
(JSC::ShadowChicken::Packet::operator bool):
169+
(JSC::ShadowChicken::Packet::isPrologue):
170+
(JSC::ShadowChicken::Packet::isTail):
171+
(JSC::ShadowChicken::Packet::isThrow):
172+
(JSC::ShadowChicken::Frame::Frame):
173+
(JSC::ShadowChicken::Frame::operator==):
174+
(JSC::ShadowChicken::Frame::operator!=):
175+
(JSC::ShadowChicken::log):
176+
(JSC::ShadowChicken::logSize):
177+
(JSC::ShadowChicken::addressOfLogCursor):
178+
(JSC::ShadowChicken::logEnd):
179+
* interpreter/ShadowChickenInlines.h: Added.
180+
(JSC::ShadowChicken::iterate):
181+
* interpreter/StackVisitor.h:
182+
(JSC::StackVisitor::Frame::callee):
183+
(JSC::StackVisitor::Frame::codeBlock):
184+
(JSC::StackVisitor::Frame::bytecodeOffset):
185+
(JSC::StackVisitor::Frame::inlineCallFrame):
186+
(JSC::StackVisitor::Frame::isJSFrame):
187+
(JSC::StackVisitor::Frame::isInlinedFrame):
188+
(JSC::StackVisitor::visit):
189+
* jit/CCallHelpers.cpp: Added.
190+
(JSC::CCallHelpers::logShadowChickenProloguePacket):
191+
(JSC::CCallHelpers::logShadowChickenTailPacket):
192+
(JSC::CCallHelpers::setupShadowChickenPacket):
193+
* jit/CCallHelpers.h:
194+
(JSC::CCallHelpers::prepareForTailCallSlow):
195+
* jit/JIT.cpp:
196+
(JSC::JIT::privateCompileMainPass):
197+
* jit/JIT.h:
198+
* jit/JITExceptions.cpp:
199+
(JSC::genericUnwind):
200+
* jit/JITOpcodes.cpp:
201+
(JSC::JIT::emit_op_resume):
202+
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
203+
(JSC::JIT::emit_op_log_shadow_chicken_tail):
204+
* jit/JITOperations.cpp:
205+
* jit/JITOperations.h:
206+
* jsc.cpp:
207+
(GlobalObject::finishCreation):
208+
(FunctionJSCStackFunctor::FunctionJSCStackFunctor):
209+
(FunctionJSCStackFunctor::operator()):
210+
(functionClearSamplingFlags):
211+
(functionShadowChickenFunctionsOnStack):
212+
(functionReadline):
213+
* llint/LLIntOffsetsExtractor.cpp:
214+
* llint/LLIntSlowPaths.cpp:
215+
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
216+
(JSC::LLInt::llint_throw_stack_overflow_error):
217+
* llint/LLIntSlowPaths.h:
218+
* llint/LowLevelInterpreter.asm:
219+
* profiler/ProfileGenerator.cpp:
220+
(JSC::AddParentForConsoleStartFunctor::foundParent):
221+
(JSC::AddParentForConsoleStartFunctor::operator()):
222+
* runtime/Error.cpp:
223+
(JSC::FindFirstCallerFrameWithCodeblockFunctor::FindFirstCallerFrameWithCodeblockFunctor):
224+
(JSC::FindFirstCallerFrameWithCodeblockFunctor::operator()):
225+
(JSC::addErrorInfoAndGetBytecodeOffset):
226+
* runtime/JSFunction.cpp:
227+
(JSC::RetrieveArgumentsFunctor::result):
228+
(JSC::RetrieveArgumentsFunctor::operator()):
229+
(JSC::retrieveArguments):
230+
(JSC::RetrieveCallerFunctionFunctor::result):
231+
(JSC::RetrieveCallerFunctionFunctor::operator()):
232+
(JSC::retrieveCallerFunction):
233+
* runtime/JSGlobalObjectFunctions.cpp:
234+
(JSC::GlobalFuncProtoGetterFunctor::result):
235+
(JSC::GlobalFuncProtoGetterFunctor::operator()):
236+
(JSC::globalFuncProtoGetter):
237+
(JSC::GlobalFuncProtoSetterFunctor::allowsAccess):
238+
(JSC::GlobalFuncProtoSetterFunctor::operator()):
239+
* runtime/NullSetterFunction.cpp:
240+
(JSC::GetCallerStrictnessFunctor::GetCallerStrictnessFunctor):
241+
(JSC::GetCallerStrictnessFunctor::operator()):
242+
(JSC::GetCallerStrictnessFunctor::callerIsStrict):
243+
(JSC::callerIsStrict):
244+
* runtime/ObjectConstructor.cpp:
245+
(JSC::ObjectConstructorGetPrototypeOfFunctor::result):
246+
(JSC::ObjectConstructorGetPrototypeOfFunctor::operator()):
247+
(JSC::objectConstructorGetPrototypeOf):
248+
* runtime/Options.h:
249+
* runtime/VM.cpp:
250+
(JSC::VM::VM):
251+
(JSC::SetEnabledProfilerFunctor::operator()):
252+
* runtime/VM.h:
253+
(JSC::VM::shouldBuilderPCToCodeOriginMapping):
254+
(JSC::VM::bytecodeIntrinsicRegistry):
255+
(JSC::VM::shadowChicken):
256+
* tests/stress/resources/shadow-chicken-support.js: Added.
257+
(describeFunction):
258+
(describeArray):
259+
(expectStack):
260+
(initialize):
261+
* tests/stress/shadow-chicken-disabled.js: Added.
262+
(test1.foo):
263+
(test1.bar):
264+
(test1.baz):
265+
(test1):
266+
(test2.foo):
267+
(test2.bar):
268+
(test2.baz):
269+
(test2):
270+
(test3.foo):
271+
(test3.bar):
272+
(test3.baz):
273+
(test3):
274+
* tests/stress/shadow-chicken-enabled.js: Added.
275+
(test1.foo):
276+
(test1.bar):
277+
(test1.baz):
278+
(test1):
279+
(test2.foo):
280+
(test2.bar):
281+
(test2.baz):
282+
(test2):
283+
(test3.bob):
284+
(test3.thingy):
285+
(test3.foo):
286+
(test3.bar):
287+
(test3.baz):
288+
(test3):
289+
(test4.bob):
290+
(test4.thingy):
291+
(test4.foo):
292+
(test4.bar):
293+
(test4.baz):
294+
(test4):
295+
(test5.foo):
296+
(test5):
297+
* tools/JSDollarVMPrototype.cpp:
298+
(JSC::CallerFrameJITTypeFunctor::CallerFrameJITTypeFunctor):
299+
(JSC::CallerFrameJITTypeFunctor::operator()):
300+
(JSC::CallerFrameJITTypeFunctor::jitType):
301+
(JSC::functionLLintTrue):
302+
(JSC::CellAddressCheckFunctor::CellAddressCheckFunctor):
303+
(JSC::CellAddressCheckFunctor::operator()):
304+
(JSC::JSDollarVMPrototype::isValidCell):
305+
(JSC::JSDollarVMPrototype::isValidCodeBlock):
306+
(JSC::JSDollarVMPrototype::codeBlockForFrame):
307+
(JSC::PrintFrameFunctor::PrintFrameFunctor):
308+
(JSC::PrintFrameFunctor::operator()):
309+
(JSC::printCallFrame):
310+
1311
2016-03-19 Filip Pizlo <fpizlo@apple.com>
2312

3313
DFG and FTL should constant-fold RegExpExec, RegExpTest, and StringReplace

0 commit comments

Comments
 (0)