Here is Phil's rough sketch: ``` Say we have: function foo(a, b) { return a + b; } And say that it translates to this BC: [ 0] op_enter [ 1] op_add loc0, arg0, arg1 [ 6] op_ret And say that it's all predicted ints without overflows. So here's the megadisasm: 0x100000000 pushq %ebp ... prologue 0: JSConstant(...) 1: JSConstant(...) ... more prologue [ 0] op_enter 0: JSConstant(...) MovHint(...) ... more DFG prologue [ 1] op_add loc0, arg0, arg1 2: GetStack(arg0) Int32 @42 = Load(@13, stuff) Move stuff(%rbp), %things movl stuff(%rbp), %things 3: GetStack(arg1) Int32 @43 = Load(@13, otherstuff) Move otherstuff(%rbp), %otherthings movl otherstuff(%rbp), %otherthings 4: ArithAdd(Int32: @2, Int32:@3) Int32 @44 = CheckAdd(@2, @3, ...) Patch &BranchAdd32, ... addl ... jo ... ... and so on ``` This would be super cool.
Created attachment 303016 [details] patch
Created attachment 303018 [details] patch Change a variable name.
Attachment 303018 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/ChangeLog:20: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:23: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:27: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:37: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:41: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:45: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:49: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:53: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:63: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:69: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:78: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ChangeLog:84: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/ftl/FTLCompile.cpp:35: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/ftl/FTLCompile.cpp:190: More than one command on the same line [whitespace/newline] [4] Total errors found: 14 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Will fix style before landing.
Comment on attachment 303018 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=303018&action=review LGTM > Source/JavaScriptCore/b3/air/AirDisassembler.h:53 > + void dump(Code&, PrintStream&, LinkBuffer&, const char*, const char*, std::function<void(Inst&)> doToEachInst); nit: I think it's worth const char* airPrefix, const char* asmPrefix in the args because it's not obvious from the type alone what the purpose of the args are.
landed in: https://trac.webkit.org/changeset/213233