Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (233905 => 233906)
--- trunk/Source/_javascript_Core/ChangeLog 2018-07-18 03:50:12 UTC (rev 233905)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-07-18 05:14:25 UTC (rev 233906)
@@ -1,3 +1,25 @@
+2018-07-17 Keith Miller <[email protected]>
+
+ Revert r233630 since it broke internal wasm benchmarks
+ https://bugs.webkit.org/show_bug.cgi?id=187746
+
+ Unreviewed revert.
+
+ This patch seems to have broken internal Wasm benchmarks. This
+ issue is likely due to an underlying bug but let's rollout while
+ we investigate.
+
+ * bytecode/CodeType.h:
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::UnlinkedCodeBlock::codeType const):
+ (JSC::UnlinkedCodeBlock::didOptimize const):
+ (JSC::UnlinkedCodeBlock::setDidOptimize):
+ * bytecode/VirtualRegister.h:
+ (JSC::VirtualRegister::VirtualRegister):
+ (): Deleted.
+
2018-07-17 Mark Lam <[email protected]>
CodeBlock::baselineVersion() should account for executables with purged codeBlocks.
Modified: trunk/Source/_javascript_Core/bytecode/CodeType.h (233905 => 233906)
--- trunk/Source/_javascript_Core/bytecode/CodeType.h 2018-07-18 03:50:12 UTC (rev 233905)
+++ trunk/Source/_javascript_Core/bytecode/CodeType.h 2018-07-18 05:14:25 UTC (rev 233906)
@@ -27,13 +27,7 @@
namespace JSC {
-// CodeType should be within 2 bits (0b00 - 0b11).
-enum CodeType : uint8_t {
- GlobalCode,
- EvalCode,
- FunctionCode,
- ModuleCode
-};
+enum CodeType { GlobalCode, EvalCode, FunctionCode, ModuleCode };
} // namespace JSC
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp (233905 => 233906)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2018-07-18 03:50:12 UTC (rev 233905)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2018-07-18 05:14:25 UTC (rev 233906)
@@ -54,6 +54,7 @@
UnlinkedCodeBlock::UnlinkedCodeBlock(VM* vm, Structure* structure, CodeType codeType, const ExecutableInfo& info, DebuggerMode debuggerMode)
: Base(*vm, structure)
+ , m_globalObjectRegister(VirtualRegister())
, m_usesEval(info.usesEval())
, m_isStrictMode(info.isStrictMode())
, m_isConstructor(info.isConstructor())
@@ -68,14 +69,18 @@
, m_derivedContextType(static_cast<unsigned>(info.derivedContextType()))
, m_evalContextType(static_cast<unsigned>(info.evalContextType()))
, m_hasTailCalls(false)
- , m_codeType(codeType)
+ , m_features(0)
, m_didOptimize(MixedTriState)
, m_parseMode(info.parseMode())
+ , m_codeType(codeType)
+ , m_arrayProfileCount(0)
+ , m_arrayAllocationProfileCount(0)
+ , m_objectAllocationProfileCount(0)
+ , m_valueProfileCount(0)
+ , m_llintCallLinkInfoCount(0)
{
for (auto& constantRegisterIndex : m_linkTimeConstants)
constantRegisterIndex = 0;
- ASSERT(codeType == this->codeType());
- ASSERT(MixedTriState == this->didOptimize());
ASSERT(m_constructorKind == static_cast<unsigned>(info.constructorKind()));
}
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h (233905 => 233906)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2018-07-18 03:50:12 UTC (rev 233905)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2018-07-18 05:14:25 UTC (rev 233906)
@@ -300,7 +300,7 @@
UnlinkedLLIntCallLinkInfo addLLIntCallLinkInfo() { return m_llintCallLinkInfoCount++; }
unsigned numberOfLLintCallLinkInfos() { return m_llintCallLinkInfoCount; }
- CodeType codeType() const { return static_cast<CodeType>(m_codeType); }
+ CodeType codeType() const { return m_codeType; }
VirtualRegister thisRegister() const { return m_thisRegister; }
VirtualRegister scopeRegister() const { return m_scopeRegister; }
@@ -361,12 +361,8 @@
bool wasCompiledWithDebuggingOpcodes() const { return m_wasCompiledWithDebuggingOpcodes; }
- TriState didOptimize() const { return static_cast<TriState>(m_didOptimize); }
- void setDidOptimize(TriState didOptimize)
- {
- m_didOptimize = static_cast<unsigned>(didOptimize);
- ASSERT(didOptimize == this->didOptimize());
- }
+ TriState didOptimize() const { return m_didOptimize; }
+ void setDidOptimize(TriState didOptimize) { m_didOptimize = didOptimize; }
void dump(PrintStream&) const;
@@ -421,6 +417,10 @@
std::unique_ptr<UnlinkedInstructionStream> m_unlinkedInstructions;
std::unique_ptr<BytecodeLivenessAnalysis> m_liveness;
+ VirtualRegister m_thisRegister;
+ VirtualRegister m_scopeRegister;
+ VirtualRegister m_globalObjectRegister;
+
String m_sourceURLDirective;
String m_sourceMappingURLDirective;
@@ -442,8 +442,7 @@
unsigned m_derivedContextType : 2;
unsigned m_evalContextType : 2;
unsigned m_hasTailCalls : 1;
- unsigned m_codeType : 2; // CodeType
- unsigned m_didOptimize : 2; // TriState
+
unsigned m_lineCount { 0 };
unsigned m_endColumn { UINT_MAX };
@@ -451,16 +450,13 @@
int m_numCalleeLocals { 0 };
int m_numParameters { 0 };
- VirtualRegister m_thisRegister;
- VirtualRegister m_scopeRegister;
- VirtualRegister m_globalObjectRegister;
-
- SourceParseMode m_parseMode;
-
public:
ConcurrentJSLock m_lock;
private:
CodeFeatures m_features { 0 };
+ TriState m_didOptimize;
+ SourceParseMode m_parseMode;
+ CodeType m_codeType;
Vector<unsigned> m_jumpTargets;
Modified: trunk/Source/_javascript_Core/bytecode/VirtualRegister.h (233905 => 233906)
--- trunk/Source/_javascript_Core/bytecode/VirtualRegister.h 2018-07-18 03:50:12 UTC (rev 233905)
+++ trunk/Source/_javascript_Core/bytecode/VirtualRegister.h 2018-07-18 05:14:25 UTC (rev 233906)
@@ -47,7 +47,9 @@
friend VirtualRegister virtualRegisterForLocal(int);
friend VirtualRegister virtualRegisterForArgument(int, int);
- VirtualRegister() = default;
+ VirtualRegister()
+ : m_virtualRegister(s_invalidVirtualRegister)
+ { }
explicit VirtualRegister(int virtualRegister)
: m_virtualRegister(virtualRegister)
@@ -107,7 +109,7 @@
static int operandToArgument(int operand) { return operand - CallFrame::thisArgumentOffset(); }
static int argumentToOperand(int argument) { return argument + CallFrame::thisArgumentOffset(); }
- int m_virtualRegister { s_invalidVirtualRegister };
+ int m_virtualRegister;
};
COMPILE_ASSERT(sizeof(VirtualRegister) == sizeof(int), VirtualRegister_is_32bit);
Modified: trunk/Source/WTF/ChangeLog (233905 => 233906)
--- trunk/Source/WTF/ChangeLog 2018-07-18 03:50:12 UTC (rev 233905)
+++ trunk/Source/WTF/ChangeLog 2018-07-18 05:14:25 UTC (rev 233906)
@@ -1,3 +1,12 @@
+2018-07-17 Keith Miller <[email protected]>
+
+ Revert r233630 since it broke internal wasm benchmarks
+ https://bugs.webkit.org/show_bug.cgi?id=187746
+
+ Unreviewed revert.
+
+ * wtf/TriState.h:
+
2018-07-14 Kocsen Chung <[email protected]>
Ensure WebKit stack is ad-hoc signed
Modified: trunk/Source/WTF/wtf/TriState.h (233905 => 233906)
--- trunk/Source/WTF/wtf/TriState.h 2018-07-18 03:50:12 UTC (rev 233905)
+++ trunk/Source/WTF/wtf/TriState.h 2018-07-18 05:14:25 UTC (rev 233906)
@@ -28,8 +28,7 @@
namespace WTF {
-// TriState should be within 2 bits (0b00 - 0b10).
-enum TriState : uint8_t {
+enum TriState {
FalseTriState,
TrueTriState,
MixedTriState