From 4cceec22870199151b0daf5bf2679349249a8b87 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 11 Feb 2016 15:38:50 +0200 Subject: [PATCH] fix script component regression since d825387f some of the function calls must be done even in release mode, further investigation is needed to find out which actually do Signed-off-by: Ivailo Monev --- .../JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 4 ++++ .../JavaScriptCore/interpreter/Interpreter.cpp | 4 ++-- .../JavaScriptCore/jit/JITPropertyAccess.cpp | 14 ++------------ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 8f42968c0..64c05c72a 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -1401,6 +1401,8 @@ RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, Regi ASSERT(func->refCount()); ASSERT(thisRegister->refCount()); + RegisterID* originalFunc = func; + // Generate code for arguments. Vector, 16> argv; argv.append(thisRegister); @@ -1481,6 +1483,8 @@ RegisterID* BytecodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func, { ASSERT(func->refCount()); + RegisterID* originalFunc = func; + RefPtr funcProto = newTemporary(); // Generate code for arguments. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp index cf055840e..89f2bfbc5 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp @@ -1981,7 +1981,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ScopeChainNode* scopeChain = callFrame->scopeChain(); ScopeChainIterator iter = scopeChain->begin(); ScopeChainIterator end = scopeChain->end(); - ASSERT_UNUSED(end, iter != end); + ASSERT(iter != end); while (skip--) { ++iter; ASSERT(iter != end); @@ -2004,7 +2004,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi ScopeChainNode* scopeChain = callFrame->scopeChain(); ScopeChainIterator iter = scopeChain->begin(); ScopeChainIterator end = scopeChain->end(); - ASSERT_UNUSED(end, iter != end); + ASSERT(iter != end); while (skip--) { ++iter; ASSERT(iter != end); diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITPropertyAccess.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITPropertyAccess.cpp index 346bfc920..ef95f996a 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITPropertyAccess.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITPropertyAccess.cpp @@ -226,9 +226,9 @@ void JIT::emit_op_method_check(Instruction* currentInstruction) move(Imm32(JSValue::CellTag), regT1); Jump match = jump(); - ASSERT_UNUSED(protoObj, differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj); + ASSERT(differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj); ASSERT(differenceBetween(info.structureToCompare, protoStructureToCompare) == patchOffsetMethodCheckProtoStruct); - ASSERT_UNUSED(putFunction, differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction); + ASSERT(differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction); // Link the failure cases here. structureCheck.link(this); @@ -392,20 +392,14 @@ void JIT::compileGetByIdHotPath() ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetGetByIdStructure); ASSERT(differenceBetween(hotPathBegin, structureCheck) == patchOffsetGetByIdBranchToSlowCase); -#if !ASSERT_DISABLED Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT2); -#endif Label externalLoadComplete(this); ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetGetByIdExternalLoad); ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthGetByIdExternalLoad); -#if !ASSERT_DISABLED DataLabel32 displacementLabel1 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT0); // payload -#endif ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetGetByIdPropertyMapOffset1); -#if !ASSERT_DISABLED DataLabel32 displacementLabel2 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT1); // tag -#endif ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetGetByIdPropertyMapOffset2); Label putResult(this); @@ -477,17 +471,13 @@ void JIT::emit_op_put_by_id(Instruction* currentInstruction) ASSERT(differenceBetween(hotPathBegin, structureToCompare) == patchOffsetPutByIdStructure); // Plant a load from a bogus ofset in the object's property map; we will patch this later, if it is to be used. -#if !ASSERT_DISABLED Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0); -#endif Label externalLoadComplete(this); ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetPutByIdExternalLoad); ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthPutByIdExternalLoad); -#if !ASSERT_DISABLED DataLabel32 displacementLabel1 = storePtrWithAddressOffsetPatch(regT2, Address(regT0, patchGetByIdDefaultOffset)); // payload DataLabel32 displacementLabel2 = storePtrWithAddressOffsetPatch(regT3, Address(regT0, patchGetByIdDefaultOffset)); // tag -#endif END_UNINTERRUPTED_SEQUENCE(sequencePutById); -- 2.11.0