This will make it easier to bring up the LLVM backend. At first, I'll probably just let LLVM use its own memory allocator. But even if we do switch to having LLVM use our allocator, we will probably want to give LLVM the ability to allocate the code for a function in multiple chunks, if it wanted to. But also, making JITCode be more abstract means that in the future we could even have a DFGJITCode, for example, which contains all of the DFGRareData things in CodeBlock. We could do likewise for the LLInt and Baseline JIT. This will save memory. Anyway, I think this is pure goodness.
Created attachment 195391 [details] the patch
Attachment 195391 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/assembler/RepatchBuffer.h', u'Source/JavaScriptCore/bytecode/CodeBlock.cpp', u'Source/JavaScriptCore/bytecode/CodeBlock.h', u'Source/JavaScriptCore/dfg/DFGDriver.cpp', u'Source/JavaScriptCore/dfg/DFGDriver.h', u'Source/JavaScriptCore/dfg/DFGJITCompiler.cpp', u'Source/JavaScriptCore/dfg/DFGJITCompiler.h', u'Source/JavaScriptCore/dfg/DFGOSREntry.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExit.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExitCompiler32_64.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExitCompiler64.cpp', u'Source/JavaScriptCore/dfg/DFGOperations.cpp', u'Source/JavaScriptCore/interpreter/Interpreter.cpp', u'Source/JavaScriptCore/jit/JIT.cpp', u'Source/JavaScriptCore/jit/JIT.h', u'Source/JavaScriptCore/jit/JITCode.cpp', u'Source/JavaScriptCore/jit/JITCode.h', u'Source/JavaScriptCore/jit/JITDriver.h', u'Source/JavaScriptCore/jit/JITStubs.cpp', u'Source/JavaScriptCore/jit/ThunkGenerators.cpp', u'Source/JavaScriptCore/llint/LLIntEntrypoints.cpp', u'Source/JavaScriptCore/llint/LLIntEntrypoints.h', u'Source/JavaScriptCore/llint/LLIntSlowPaths.cpp', u'Source/JavaScriptCore/runtime/Executable.cpp', u'Source/JavaScriptCore/runtime/Executable.h', u'Source/JavaScriptCore/runtime/ExecutionHarness.h']" exit_code: 1 Source/JavaScriptCore/jit/JITCode.h:50: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Source/JavaScriptCore/jit/JITCode.h:79: The parameter name "jitType" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/jit/JITCode.h:119: The parameter name "ref" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/jit/JITCode.h:119: The parameter name "jitType" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 4 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #2) > Attachment 195391 [details] did not pass style-queue: > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/assembler/RepatchBuffer.h', u'Source/JavaScriptCore/bytecode/CodeBlock.cpp', u'Source/JavaScriptCore/bytecode/CodeBlock.h', u'Source/JavaScriptCore/dfg/DFGDriver.cpp', u'Source/JavaScriptCore/dfg/DFGDriver.h', u'Source/JavaScriptCore/dfg/DFGJITCompiler.cpp', u'Source/JavaScriptCore/dfg/DFGJITCompiler.h', u'Source/JavaScriptCore/dfg/DFGOSREntry.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExit.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExitCompiler32_64.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExitCompiler64.cpp', u'Source/JavaScriptCore/dfg/DFGOperations.cpp', u'Source/JavaScriptCore/interpreter/Interpreter.cpp', u'Source/JavaScriptCore/jit/JIT.cpp', u'Source/JavaScriptCore/jit/JIT.h', u'Source/JavaScriptCore/jit/JITCode.cpp', u'Source/JavaScriptCore/jit/JITCode.h', u'Source/JavaScriptCore/jit/JITDriver.h', u'Source/JavaScriptCore/jit/JITStubs.cpp', u'Source/JavaScriptCore/jit/ThunkGenerators.cpp', u'Source/JavaScriptCore/llint/LLIntEntrypoints.cpp', u'Source/JavaScriptCore/llint/LLIntEntrypoints.h', u'Source/JavaScriptCore/llint/LLIntSlowPaths.cpp', u'Source/JavaScriptCore/runtime/Executable.cpp', u'Source/JavaScriptCore/runtime/Executable.h', u'Source/JavaScriptCore/runtime/ExecutionHarness.h']" exit_code: 1 > Source/JavaScriptCore/jit/JITCode.h:50: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Nope. > Source/JavaScriptCore/jit/JITCode.h:79: The parameter name "jitType" adds no information, so it should be removed. [readability/parameter_name] [5] > Source/JavaScriptCore/jit/JITCode.h:119: The parameter name "ref" adds no information, so it should be removed. [readability/parameter_name] [5] > Source/JavaScriptCore/jit/JITCode.h:119: The parameter name "jitType" adds no information, so it should be removed. [readability/parameter_name] [5] I fixed them. > Total errors found: 4 in 27 files > > > If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 195391 [details] the patch Attachment 195391 [details] did not pass qt-wk2-ews (qt): Output: http://webkit-commit-queue.appspot.com/results/17304362
Created attachment 195393 [details] the patch Fixing unresolved symbols.
Attachment 195393 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/assembler/RepatchBuffer.h', u'Source/JavaScriptCore/bytecode/CodeBlock.cpp', u'Source/JavaScriptCore/bytecode/CodeBlock.h', u'Source/JavaScriptCore/dfg/DFGDriver.cpp', u'Source/JavaScriptCore/dfg/DFGDriver.h', u'Source/JavaScriptCore/dfg/DFGJITCompiler.cpp', u'Source/JavaScriptCore/dfg/DFGJITCompiler.h', u'Source/JavaScriptCore/dfg/DFGOSREntry.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExit.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExitCompiler32_64.cpp', u'Source/JavaScriptCore/dfg/DFGOSRExitCompiler64.cpp', u'Source/JavaScriptCore/dfg/DFGOperations.cpp', u'Source/JavaScriptCore/interpreter/Interpreter.cpp', u'Source/JavaScriptCore/jit/JIT.cpp', u'Source/JavaScriptCore/jit/JIT.h', u'Source/JavaScriptCore/jit/JITCode.cpp', u'Source/JavaScriptCore/jit/JITCode.h', u'Source/JavaScriptCore/jit/JITDriver.h', u'Source/JavaScriptCore/jit/JITStubs.cpp', u'Source/JavaScriptCore/jit/ThunkGenerators.cpp', u'Source/JavaScriptCore/llint/LLIntEntrypoints.cpp', u'Source/JavaScriptCore/llint/LLIntEntrypoints.h', u'Source/JavaScriptCore/llint/LLIntSlowPaths.cpp', u'Source/JavaScriptCore/runtime/Executable.cpp', u'Source/JavaScriptCore/runtime/Executable.h', u'Source/JavaScriptCore/runtime/ExecutionHarness.h']" exit_code: 1 Source/JavaScriptCore/jit/JITCode.h:50: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] Total errors found: 1 in 27 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 195393 [details] the patch r=me
> But also, making JITCode be more abstract means that in the future we could even have a DFGJITCode, for example, which contains all of the DFGRareData things in CodeBlock. We could do likewise for the LLInt and Baseline JIT. This will save memory. For a given piece of data, how would you describe the guideline for whether it belongs in JITCode or CodeBlock?
(In reply to comment #8) > > But also, making JITCode be more abstract means that in the future we could even have a DFGJITCode, for example, which contains all of the DFGRareData things in CodeBlock. We could do likewise for the LLInt and Baseline JIT. This will save memory. > > For a given piece of data, how would you describe the guideline for whether it belongs in JITCode or CodeBlock? Specific to a particular execution engine? -> put it in JITCode not CodeBlock.
Landed in http://trac.webkit.org/changeset/147014