Changeset 228950 in webkit
- Timestamp:
- Feb 23, 2018 9:54:06 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r228943 r228950 1 2018-02-23 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 [JSC] Implement $vm.ftlTrue function for FTL testing 4 https://bugs.webkit.org/show_bug.cgi?id=183071 5 6 Reviewed by Mark Lam. 7 8 * stress/dead-fiat-value-to-int52-then-exit-not-double.js: 9 (foo): 10 * stress/dead-fiat-value-to-int52-then-exit-not-int52.js: 11 (foo): 12 * stress/dead-fiat-value-to-int52.js: 13 (foo): 14 * stress/dead-osr-entry-value.js: 15 (foo): 16 * stress/fiat-value-to-int52-then-exit-not-double.js: 17 (foo): 18 * stress/fiat-value-to-int52-then-exit-not-int52.js: 19 (foo): 20 * stress/fiat-value-to-int52-then-fail-to-fold.js: 21 (foo): 22 * stress/fiat-value-to-int52-then-fold.js: 23 (foo): 24 * stress/fiat-value-to-int52.js: 25 (foo): 26 * stress/fold-based-on-int32-proof-mul-branch.js: 27 (foo): 28 * stress/fold-profiled-call-to-call.js: 29 (foo): 30 * stress/fold-to-double-constant-then-exit.js: 31 (foo): 32 * stress/fold-to-int52-constant-then-exit.js: 33 (foo): 34 * stress/fold-to-primitive-in-cfa.js: 35 (foo): 36 * stress/fold-to-primitive-to-identity-in-cfa.js: 37 (foo): 38 * stress/has-indexed-property-array-storage-ftl.js: Added. 39 (shouldBe): 40 (test1): 41 (test2): 42 * stress/has-indexed-property-slow-put-array-storage-ftl.js: Added. 43 (shouldBe): 44 (test1): 45 (test2): 46 * stress/int52-ai-add-then-filter-int32.js: 47 (foo): 48 * stress/int52-ai-mul-and-clean-neg-zero-then-filter-int32.js: 49 (foo): 50 * stress/int52-ai-mul-then-filter-int32.js: 51 (foo): 52 * stress/int52-ai-neg-then-filter-int32.js: 53 (foo): 54 * stress/int52-ai-sub-then-filter-int32.js: 55 (foo): 56 * stress/licm-pre-header-cannot-exit-nested.js: 57 (foo): 58 * stress/licm-pre-header-cannot-exit.js: 59 (foo): 60 * stress/sparse-array-entry-update-144067.js: 61 (useMemoryToTriggerGCs): 62 * stress/test-spec-misc.js: 63 (foo): 64 * stress/tricky-array-bounds-checks.js: 65 (foo): 66 1 67 2018-02-22 Yusuke Suzuki <utatane.tea@gmail.com> 2 68 -
trunk/JSTests/stress/dead-fiat-value-to-int52-then-exit-not-double.js
r171096 r228950 1 1 function foo() { 2 var value = bar( DFGTrue());2 var value = bar($vm.dfgTrue()); 3 3 fiatInt52(value); 4 4 fiatInt52(value); -
trunk/JSTests/stress/dead-fiat-value-to-int52-then-exit-not-int52.js
r171096 r228950 1 1 function foo() { 2 var value = bar( DFGTrue());2 var value = bar($vm.dfgTrue()); 3 3 fiatInt52(value); 4 4 fiatInt52(value); -
trunk/JSTests/stress/dead-fiat-value-to-int52.js
r171096 r228950 1 1 function foo() { 2 var value = bar( DFGTrue());2 var value = bar($vm.dfgTrue()); 3 3 fiatInt52(value); 4 4 fiatInt52(value); -
trunk/JSTests/stress/dead-osr-entry-value.js
r186691 r228950 4 4 OSRExit(); 5 5 for (var i = 0; i < 10000; ++i) { 6 if (! DFGTrue())6 if (!$vm.dfgTrue()) 7 7 result += o.f; 8 8 } -
trunk/JSTests/stress/fiat-value-to-int52-then-exit-not-double.js
r171096 r228950 1 1 function foo() { 2 return fiatInt52(bar( DFGTrue())) + 1;2 return fiatInt52(bar($vm.dfgTrue())) + 1; 3 3 } 4 4 -
trunk/JSTests/stress/fiat-value-to-int52-then-exit-not-int52.js
r171096 r228950 1 1 function foo() { 2 return fiatInt52(bar( DFGTrue())) + 1;2 return fiatInt52(bar($vm.dfgTrue())) + 1; 3 3 } 4 4 -
trunk/JSTests/stress/fiat-value-to-int52-then-fail-to-fold.js
r171096 r228950 1 1 function foo() { 2 return fiatInt52( DFGTrue() ? 5.5 : 42) + 1;2 return fiatInt52($vm.dfgTrue() ? 5.5 : 42) + 1; 3 3 } 4 4 -
trunk/JSTests/stress/fiat-value-to-int52-then-fold.js
r171096 r228950 1 1 function foo() { 2 return fiatInt52( DFGTrue() ? 42 : 5.5) + 1;2 return fiatInt52($vm.dfgTrue() ? 42 : 5.5) + 1; 3 3 } 4 4 -
trunk/JSTests/stress/fiat-value-to-int52.js
r171096 r228950 1 1 function foo() { 2 return fiatInt52(bar( DFGTrue())) + 1;2 return fiatInt52(bar($vm.dfgTrue())) + 1; 3 3 } 4 4 -
trunk/JSTests/stress/fold-based-on-int32-proof-mul-branch.js
r183401 r228950 1 1 function foo(a, b) { 2 var value = DFGTrue() ? -0 : "foo";2 var value = $vm.dfgTrue() ? -0 : "foo"; 3 3 if (a * b == value) 4 return [ DFGTrue(), true];5 return [ DFGTrue(), false];4 return [$vm.dfgTrue(), true]; 5 return [$vm.dfgTrue(), false]; 6 6 } 7 7 noInline(foo); -
trunk/JSTests/stress/fold-profiled-call-to-call.js
r173069 r228950 1 1 function foo(f) { 2 if ( DFGTrue())2 if ($vm.dfgTrue()) 3 3 f = bar; 4 4 return f().f; -
trunk/JSTests/stress/fold-to-double-constant-then-exit.js
r167612 r228950 1 1 function foo(a, b) { 2 if ( DFGTrue())2 if ($vm.dfgTrue()) 3 3 a = b = 5.4; 4 4 var c = a + b; -
trunk/JSTests/stress/fold-to-int52-constant-then-exit.js
r167612 r228950 1 1 function foo(a, b) { 2 if ( DFGTrue())2 if ($vm.dfgTrue()) 3 3 a = b = 2000000000; 4 4 var c = a + b; -
trunk/JSTests/stress/fold-to-primitive-in-cfa.js
r164243 r228950 1 1 function foo(x) { 2 if ( DFGTrue())2 if ($vm.dfgTrue()) 3 3 x = "hello"; 4 4 return x + " world"; -
trunk/JSTests/stress/fold-to-primitive-to-identity-in-cfa.js
r164243 r228950 1 1 function foo(x, p) { 2 if ( DFGTrue())2 if ($vm.dfgTrue()) 3 3 x = p ? "hello" : "bar"; 4 4 return x + " world"; -
trunk/JSTests/stress/int52-ai-add-then-filter-int32.js
r168172 r228950 1 1 function foo(a, b, c) { 2 2 var o = {f:42}; 3 if ( DFGTrue())3 if ($vm.dfgTrue()) 4 4 o.f = a + b + c; 5 5 return o.f | 0; -
trunk/JSTests/stress/int52-ai-mul-and-clean-neg-zero-then-filter-int32.js
r168172 r228950 1 1 function foo(a, b, c) { 2 2 var o = {f:42}; 3 if ( DFGTrue())3 if ($vm.dfgTrue()) 4 4 o.f = (a * b + 5) * c + 5; 5 5 return o.f | 0; -
trunk/JSTests/stress/int52-ai-mul-then-filter-int32.js
r168172 r228950 1 1 function foo(a, b, c) { 2 2 var o = {f:42}; 3 if ( DFGTrue())3 if ($vm.dfgTrue()) 4 4 o.f = a * b * c; 5 5 return o.f | 0; -
trunk/JSTests/stress/int52-ai-neg-then-filter-int32.js
r168172 r228950 1 1 function foo(a, b) { 2 2 var o = {f:42}; 3 if ( DFGTrue())3 if ($vm.dfgTrue()) 4 4 o.f = -(a + b); 5 5 return o.f | 0; -
trunk/JSTests/stress/int52-ai-sub-then-filter-int32.js
r168172 r228950 1 1 function foo(a, b) { 2 2 var o = {f:42}; 3 if ( DFGTrue())3 if ($vm.dfgTrue()) 4 4 o.f = a - b - 2000000000; 5 5 return o.f | 0; -
trunk/JSTests/stress/licm-pre-header-cannot-exit-nested.js
r208692 r228950 5 5 var result = 0; 6 6 var i = 0; 7 if ( DFGTrue())7 if ($vm.dfgTrue()) 8 8 predicate = 42; 9 9 while (predicate >= 42) { -
trunk/JSTests/stress/licm-pre-header-cannot-exit.js
r208692 r228950 4 4 var result = 0; 5 5 var i = 0; 6 if ( DFGTrue())6 if ($vm.dfgTrue()) 7 7 predicate = 42; 8 8 while (predicate >= 42) { -
trunk/JSTests/stress/sparse-array-entry-update-144067.js
r183128 r228950 37 37 function useMemoryToTriggerGCs() { 38 38 var arr = []; 39 var limit = DFGTrue() ? 10000 : 100;39 var limit = $vm.dfgTrue() ? 10000 : 100; 40 40 for (var i = 0; i < limit; i++) 41 41 arr[i] = { a: "using" + i, b: "up" + i, c: "memory" + i }; -
trunk/JSTests/stress/test-spec-misc.js
r167112 r228950 12 12 function foo(index) { 13 13 var result = false; 14 var x = getX( DFGTrue());14 var x = getX($vm.dfgTrue()); 15 15 16 16 x * 2; -
trunk/JSTests/stress/tricky-array-bounds-checks.js
r164226 r228950 1 1 function foo(a, i, p) { 2 if (p || ! DFGTrue())3 return [ DFGTrue(), a[(i - (DFGTrue() ? 2147483646 : 0)) | 0], a[i], a[(i + (DFGTrue() ? 2147483646 : 0)) | 0], DFGTrue()];2 if (p || !$vm.dfgTrue()) 3 return [$vm.dfgTrue(), a[(i - ($vm.dfgTrue() ? 2147483646 : 0)) | 0], a[i], a[(i + ($vm.dfgTrue() ? 2147483646 : 0)) | 0], $vm.dfgTrue()]; 4 4 return [12]; 5 5 } -
trunk/Source/JavaScriptCore/ChangeLog
r228943 r228950 1 2018-02-23 Yusuke Suzuki <utatane.tea@gmail.com> 2 3 [JSC] Implement $vm.ftlTrue function for FTL testing 4 https://bugs.webkit.org/show_bug.cgi?id=183071 5 6 Reviewed by Mark Lam. 7 8 Add $vm.ftlTrue, which becomes true if the caller is compiled in FTL. 9 This is useful for testing whether the caller function is compiled in FTL. 10 11 We also remove duplicate DFGTrue function in jsc.cpp. We have $vm.dfgTrue. 12 13 * dfg/DFGByteCodeParser.cpp: 14 (JSC::DFG::ByteCodeParser::handleIntrinsicCall): 15 * jsc.cpp: 16 (GlobalObject::finishCreation): 17 (functionFalse1): 18 (functionFalse2): Deleted. 19 * runtime/Intrinsic.cpp: 20 (JSC::intrinsicName): 21 * runtime/Intrinsic.h: 22 * tools/JSDollarVM.cpp: 23 (JSC::functionFTLTrue): 24 (JSC::JSDollarVM::finishCreation): 25 1 26 2018-02-22 Yusuke Suzuki <utatane.tea@gmail.com> 2 27 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r228860 r228950 2778 2778 insertChecks(); 2779 2779 set(VirtualRegister(resultOperand), jsConstant(jsBoolean(true))); 2780 return true; 2781 } 2782 2783 case FTLTrueIntrinsic: { 2784 insertChecks(); 2785 set(VirtualRegister(resultOperand), jsConstant(jsBoolean(isFTL(m_graph.m_plan.mode)))); 2780 2786 return true; 2781 2787 } -
trunk/Source/JavaScriptCore/jsc.cpp
r228533 r228950 289 289 static EncodedJSValue JSC_HOST_CALL functionFailNextNewCodeBlock(ExecState*); 290 290 static NO_RETURN_WITH_VALUE EncodedJSValue JSC_HOST_CALL functionQuit(ExecState*); 291 static EncodedJSValue JSC_HOST_CALL functionFalse1(ExecState*); 292 static EncodedJSValue JSC_HOST_CALL functionFalse2(ExecState*); 291 static EncodedJSValue JSC_HOST_CALL functionFalse(ExecState*); 293 292 static EncodedJSValue JSC_HOST_CALL functionUndefined1(ExecState*); 294 293 static EncodedJSValue JSC_HOST_CALL functionUndefined2(ExecState*); … … 516 515 #endif 517 516 518 putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "DFGTrue"), 0, functionFalse1, DFGTrueIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));519 517 putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "OSRExit"), 0, functionUndefined1, OSRExitIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum)); 520 putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "isFinalTier"), 0, functionFalse 2, IsFinalTierIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));518 putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "isFinalTier"), 0, functionFalse, IsFinalTierIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum)); 521 519 putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "predictInt32"), 0, functionUndefined2, SetInt32HeapPredictionIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum)); 522 520 putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "isInt32"), 0, functionIsInt32, CheckInt32Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum)); … … 1828 1826 } 1829 1827 1830 EncodedJSValue JSC_HOST_CALL functionFalse1(ExecState*) { return JSValue::encode(jsBoolean(false)); } 1831 EncodedJSValue JSC_HOST_CALL functionFalse2(ExecState*) { return JSValue::encode(jsBoolean(false)); } 1828 EncodedJSValue JSC_HOST_CALL functionFalse(ExecState*) { return JSValue::encode(jsBoolean(false)); } 1832 1829 1833 1830 EncodedJSValue JSC_HOST_CALL functionUndefined1(ExecState*) { return JSValue::encode(jsUndefined()); } -
trunk/Source/JavaScriptCore/runtime/Intrinsic.cpp
r227723 r228950 214 214 case DFGTrueIntrinsic: 215 215 return "DFGTrueIntrinsic"; 216 case FTLTrueIntrinsic: 217 return "FTLTrueIntrinsic"; 216 218 case OSRExitIntrinsic: 217 219 return "OSRExitIntrinsic"; -
trunk/Source/JavaScriptCore/runtime/Intrinsic.h
r227723 r228950 125 125 // jsc.cpp and should never be exposed to users. 126 126 DFGTrueIntrinsic, 127 FTLTrueIntrinsic, 127 128 OSRExitIntrinsic, 128 129 IsFinalTierIntrinsic, -
trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp
r226384 r228950 1050 1050 } 1051 1051 1052 // Returns true if the current frame is a FTL frame. 1053 // Usage: isFTL = $vm.ftlTrue() 1054 static EncodedJSValue JSC_HOST_CALL functionFTLTrue(ExecState*) 1055 { 1056 return JSValue::encode(jsBoolean(false)); 1057 } 1058 1052 1059 static EncodedJSValue JSC_HOST_CALL functionCpuMfence(ExecState*) 1053 1060 { … … 1760 1767 1761 1768 putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "dfgTrue"), 0, functionDFGTrue, DFGTrueIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum)); 1769 putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "ftlTrue"), 0, functionFTLTrue, FTLTrueIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum)); 1762 1770 1763 1771 putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "cpuMfence"), 0, functionCpuMfence, CPUMfenceIntrinsic, 0);
Note: See TracChangeset
for help on using the changeset viewer.