RESOLVED FIXED 113437
fourthTier: JITCode should abstract exactly how the JIT code is structured and where it was allocated
https://bugs.webkit.org/show_bug.cgi?id=113437
Summary fourthTier: JITCode should abstract exactly how the JIT code is structured an...
Filip Pizlo
Reported 2013-03-27 13:24:51 PDT
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.
Attachments
the patch (55.71 KB, patch)
2013-03-27 14:07 PDT, Filip Pizlo
webkit-ews: commit-queue-
the patch (55.76 KB, patch)
2013-03-27 14:15 PDT, Filip Pizlo
mhahnenberg: review+
Filip Pizlo
Comment 1 2013-03-27 14:07:45 PDT
Created attachment 195391 [details] the patch
WebKit Review Bot
Comment 2 2013-03-27 14:10:22 PDT
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.
Filip Pizlo
Comment 3 2013-03-27 14:12:27 PDT
(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.
Early Warning System Bot
Comment 4 2013-03-27 14:14:13 PDT
Filip Pizlo
Comment 5 2013-03-27 14:15:48 PDT
Created attachment 195393 [details] the patch Fixing unresolved symbols.
WebKit Review Bot
Comment 6 2013-03-27 14:18:37 PDT
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.
Mark Hahnenberg
Comment 7 2013-03-27 14:22:35 PDT
Comment on attachment 195393 [details] the patch r=me
Geoffrey Garen
Comment 8 2013-03-27 15:40:14 PDT
> 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?
Filip Pizlo
Comment 9 2013-03-27 15:49:44 PDT
(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.
Filip Pizlo
Comment 10 2013-03-27 15:56:55 PDT
Note You need to log in before you can comment on or make changes to this bug.