From 188abf6ee2bb8a8dca6a601594c62e688d90229a Mon Sep 17 00:00:00 2001 From: "fpizlo@apple.com" Date: Mon, 2 Jan 2012 00:33:07 +0000 Subject: [PATCH] Call instructions should leave room for linking information https://bugs.webkit.org/show_bug.cgi?id=75422 Reviewed by Oliver Hunt. * bytecode/Opcode.h: * bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::emitCall): (JSC::BytecodeGenerator::emitConstruct): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@103887 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/JavaScriptCore/ChangeLog | 13 +++++++++++++ Source/JavaScriptCore/bytecode/Opcode.h | 6 +++--- Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 4 ++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 2fece8e..3bccedd 100644 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,16 @@ +2012-01-01 Filip Pizlo + + Call instructions should leave room for linking information + https://bugs.webkit.org/show_bug.cgi?id=75422 + + + Reviewed by Oliver Hunt. + + * bytecode/Opcode.h: + * bytecompiler/BytecodeGenerator.cpp: + (JSC::BytecodeGenerator::emitCall): + (JSC::BytecodeGenerator::emitConstruct): + 2011-12-31 Dan Bernstein Continue trying to fix the Windows build after r103823. diff --git a/Source/JavaScriptCore/bytecode/Opcode.h b/Source/JavaScriptCore/bytecode/Opcode.h index 949d69f..4801e4c 100644 --- a/Source/JavaScriptCore/bytecode/Opcode.h +++ b/Source/JavaScriptCore/bytecode/Opcode.h @@ -164,8 +164,8 @@ namespace JSC { \ macro(op_new_func, 4) \ macro(op_new_func_exp, 3) \ - macro(op_call, 4) \ - macro(op_call_eval, 4) \ + macro(op_call, 6) \ + macro(op_call_eval, 6) \ macro(op_call_varargs, 5) \ macro(op_tear_off_activation, 3) \ macro(op_tear_off_arguments, 2) \ @@ -174,7 +174,7 @@ namespace JSC { macro(op_ret_object_or_this, 3) \ macro(op_method_check, 1) \ \ - macro(op_construct, 4) \ + macro(op_construct, 6) \ macro(op_strcat, 4) \ macro(op_to_primitive, 3) \ \ diff --git a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index 14a1383..dec5c82 100644 --- a/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -1821,6 +1821,8 @@ RegisterID* BytecodeGenerator::emitCall(OpcodeID opcodeID, RegisterID* dst, Regi instructions().append(func->index()); // func instructions().append(callArguments.argumentCountIncludingThis()); // argCount instructions().append(callArguments.registerOffset()); // registerOffset + instructions().append(0); + instructions().append(0); if (dst != ignoredResult()) { emitOpcode(op_call_put_result); instructions().append(dst->index()); // dst @@ -1921,6 +1923,8 @@ RegisterID* BytecodeGenerator::emitConstruct(RegisterID* dst, RegisterID* func, instructions().append(func->index()); // func instructions().append(callArguments.argumentCountIncludingThis()); // argCount instructions().append(callArguments.registerOffset()); // registerOffset + instructions().append(0); + instructions().append(0); if (dst != ignoredResult()) { emitOpcode(op_call_put_result); instructions().append(dst->index()); // dst -- 2.7.4