OSDN Git Service

fix script component regression since d825387f
authorIvailo Monev <xakepa10@gmail.com>
Thu, 11 Feb 2016 13:38:50 +0000 (15:38 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Thu, 11 Feb 2016 13:39:57 +0000 (15:39 +0200)
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 <xakepa10@gmail.com>
src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
src/3rdparty/javascriptcore/JavaScriptCore/jit/JITPropertyAccess.cpp

index 8f42968..64c05c7 100644 (file)
@@ -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<RefPtr<RegisterID>, 16> argv;
     argv.append(thisRegister);
@@ -1481,6 +1483,8 @@ RegisterID* BytecodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func,
 {
     ASSERT(func->refCount());
 
+    RegisterID* originalFunc = func;
+
     RefPtr<RegisterID> funcProto = newTemporary();
 
     // Generate code for arguments.
index cf05584..89f2bfb 100644 (file)
@@ -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);
index 346bfc9..ef95f99 100644 (file)
@@ -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);