Get rid of IsInlinedCodeTag and its associated methods since it's unused
https://bugs.webkit.org/show_bug.cgi?id=121737
Source/JavaScriptCore:
Reviewed by Sam Weinig.
This was meant to be easy, but I kept wondering if it was safe to remove the
inline call frame check in Arguments::tearOff(). The check was clearly dead
since the bit wasn't being set anywhere.
It turns out that the unwindCallFrame() function was relying on tearOff()
doing the right thing for inlined code, but it wasn't even passing it an
inline call frame. I fixed this by having unwindCallFrame() inlining check,
while also making sure that the code uses the right operand index for the
arguments register.
* interpreter/CallFrame.h:
* interpreter/CallFrameInlines.h:
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::r):
* interpreter/StackVisitor.h:
* runtime/Arguments.cpp:
(JSC::Arguments::tearOff):
LayoutTests:
Reviewed by Sam Weinig.
* js/dfg-inline-arguments-capture-throw-exception-expected.txt: Added.
* js/dfg-inline-arguments-capture-throw-exception.html: Added.
* js/script-tests/dfg-inline-arguments-capture-throw-exception.js: Added.
(foo):
(bar):
(makeF):
(recurse):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h
index c40a0dd..1106106 100644
--- a/Source/JavaScriptCore/interpreter/CallFrame.h
+++ b/Source/JavaScriptCore/interpreter/CallFrame.h
@@ -134,30 +134,23 @@
static inline bool isCodeOriginIndex(uint32_t bits);
static inline uint32_t encodeAsCodeOriginIndex(uint32_t bits);
- static inline bool isInlinedCode(uint32_t bits);
- static inline uint32_t encodeAsInlinedCode(uint32_t bits);
-
private:
enum TypeTag {
BytecodeLocationTag = 0,
CodeOriginIndexTag = 1,
- IsInlinedCodeTag = 2,
};
static inline uint32_t encode(TypeTag, uint32_t bits);
- static const uint32_t s_mask = 0x3;
+ static const uint32_t s_mask = 0x1;
#if USE(JSVALUE64)
- static const uint32_t s_shift = 30;
+ static const uint32_t s_shift = 31;
static const uint32_t s_shiftedMask = s_mask << s_shift;
#else
- static const uint32_t s_shift = 2;
+ static const uint32_t s_shift = 1;
#endif
};
- bool isInlinedFrame() const;
- void setIsInlinedFrame();
-
bool hasLocationAsBytecodeOffset() const;
bool hasLocationAsCodeOriginIndex() const;