- 14 Feb, 2019 1 commit
-
-
Benedikt Meurer authored
When calling into API callbacks from TurboFan optimized, we can currently only take a fast-path when TurboFan is able to find some information about the receiver in the graph, or when the API callback specifies that it neither requires an access check (aka "accepts any receiver") nor an interface check (aka "compatible receiver check"). This change introduces a new CallFunctionTemplate builtin that sits in front of the CallApiCallback builtin and does both the access as well as the interface check as necessary (and raises appropriate exceptions). This way TurboFan can still call into the API callback via the fast-path even without ahead knowledge about the receiver, which is significantly faster than the generic call machinery for API callbacks. On the test case from the Angular team[1], the interesting metrics improve from DOM_mono: 0.273 ms DOM_mega: 0.571 ms DOM_call: 0.649 ms to DOM_mono: 0.264 ms DOM_mega: 0.572 ms DOM_call: 0.368 ms so the DOM_call is only about **1.4 times slower** than the DOM_mono and about **1.5 times faster** than the DOM_mega case (compared to **2.4 times slower**). Execution time in the DOM_call was reduced by around **~45%**. Currently this new code path is limited to TurboFan optimized code, but the idea is to eventually migrate the API calls from baseline to also use the new CSA functionality, but there are lot's of subleties to take into account, so starting with small changes to get coverage for the basic building blocks. [1]: https://mhevery.github.io/perf-tests/DOM-megamorphic.html Bug: v8:8820 Change-Id: Ie1029cf182ce05a6e519fd9a9d4fa825db8adb4c Cq-Include-Trybots: luci.chromium.try:linux-blink-rel Reviewed-on: https://chromium-review.googlesource.com/c/1470129 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#59598}
-
- 13 Feb, 2019 2 commits
-
-
Nico Weber authored
For macros expanding to function definitions, I removed the spurious ; after macro invocations. For macros expandign to function declarations, I made the ; required and consistently inserted it. No behavior change. Bug: chromium:926235 Change-Id: Ib8085d85d913d74307e3481f7fee4b7dc78c7549 Reviewed-on: https://chromium-review.googlesource.com/c/1467545Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#59558}
-
Benedikt Meurer authored
Refactor the CallApiCallback builtin to - pass the context as with other stubs, and - pass holder and call data in registers. This avoids having to place holder and call data onto the stack, and thus makes it possible to easily call the CallApiCallback builtin from other builtins while just forwarding the (stack) arguments. The idea is to use this in the future to optimize the general case of calling into any API method via a FunctionTemplateInfo and doing appropriate security and/or interface checks upfront as necessary (eventually making the HandleApiCall C++ builtin obsolete at some point). Bug: v8:8820, chromium:913553 Change-Id: I10c0065016df4d0c24bac3d46945ea597b65ed02 Cq-Include-Trybots: luci.chromium.try:linux-blink-rel Reviewed-on: https://chromium-review.googlesource.com/c/1469821 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#59551}
-
- 17 Jan, 2019 2 commits
-
-
tzik authored
This updates the InterfaceDescriptor for JSRunMicrotasksEntry and RunMicrotasksTrampoline from DummyDescriptor to RunMicrotasksEntryDescriptor. Bug: v8:8124 Change-Id: I4522fd45bd18b33a2a4471b76c217d2a0f504cb0 Reviewed-on: https://chromium-review.googlesource.com/c/1412132 Commit-Queue: Taiju Tsuiki <tzik@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#58879}
-
tzik authored
The previous implementation of MicrotaskQueue::RunMicrotasks() didn't support non-default MicrotaskQueue as RunMicrotasks builtin couldn't take a parameter. This CL updates the entry trampoline for RunMicrotasks builtin to pass a MicrotaskQueue parameter to support non-default one. Bug: v8:8124 Change-Id: I817238cd9a1fd6c20dcd58022274736c5e86229a Reviewed-on: https://chromium-review.googlesource.com/c/1369906Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Taiju Tsuiki <tzik@chromium.org> Cr-Commit-Position: refs/heads/master@{#58872}
-
- 16 Jan, 2019 1 commit
-
-
Jakob Gruber authored
On ia32, arm and mips we generate miscellaneous memcpy-related functions at runtime: arm: memcpy for uint8-uint8 and uint16-uint8 {dest-source} pairs. ia32: memmove mips: memcpy uint8-uint8 In jitless mode, runtime codegen is disallowed, so these must be converted into builtins. As far as I can tell, the mips64 files were dead code (#ifdef'd to V8_HOST_ARCH_MIPS instead of MIPS64). Note also the slightly changed implementation of ia32's MemMove's jump tables. Bug: v8:8675 Change-Id: I5dc2a50fcbad332ce9f78228425b987b0d9acdf3 Reviewed-on: https://chromium-review.googlesource.com/c/1407067Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#58839}
-
- 15 Jan, 2019 1 commit
-
-
Predrag Rudic authored
Change-Id: I151a2fe17e169e7ed47ddfc0dc239a237b9084ff Reviewed-on: https://chromium-review.googlesource.com/c/1409424Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Predrag Rudic <prudic@wavecomp.com> Cr-Commit-Position: refs/heads/master@{#58811}
-
- 14 Jan, 2019 1 commit
-
-
Predrag Rudic authored
Failure to make snapshot in debug mode on MIPS was caused by bad floating point register allocation for function parameters. According to MIPS convention, floating point parameters cannot be stored on odd numbered floating point register. Which was the case (f7 was allocated). This patch ensures that f12 and f14 are used for storing fp parameters. To be able to determine types of parameters in InitializePlatformSpecific method, InitializePlatformIndependent has to be executed first. InitializePlatformIndependent requires number of parameters in arguments. That is the reason for changing definitions of CompareDescriptor and BinaryDescriptor classes. Change-Id: I7d723e03385f756114df60e33798400e97d99d8f Reviewed-on: https://chromium-review.googlesource.com/c/1400415Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Predrag Rudic <prudic@wavecomp.com> Cr-Commit-Position: refs/heads/master@{#58768}
-
- 19 Dec, 2018 1 commit
-
-
Sigurd Schneider authored
This refactoring reduces the LoC after preprocessor expansion by 370,322 gen ( 21 files): 71,503 to 1,631,168 ( 23x) src ( 624 files): 367,639 to 53,231,764 ( 145x) test ( 392 files): 490,770 to 37,450,839 ( 76x) third_party ( 432 files): 239,085 to 9,547,902 ( 40x) total ( 1521 files): 1,183,681 to 102,836,194 ( 87x) gen ( 21 files): 71,503 to 1,613,222 ( 23x) src ( 624 files): 367,634 to 52,964,046 ( 144x) test ( 392 files): 490,771 to 37,366,181 ( 76x) third_party ( 432 files): 239,085 to 9,547,902 ( 40x) total ( 1521 files): 1,183,677 to 102,465,872 ( 87x) Bug: v8:8562 Change-Id: Ib4e771c37471a2ff19c5538e62c038943cc74eaf Reviewed-on: https://chromium-review.googlesource.com/c/1382469Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#58349}
-
- 13 Dec, 2018 1 commit
-
-
Jakob Gruber authored
Post-stub-to-builtin migration, all explicit connection between descriptors and their associated ASM code has been lost. This restores the connection where possible. Builtins without an associated descriptor are marked with the DummyDescriptor. Drive-by: alpha-sort the descriptor list. Drive-by: use Builtins::CallableFor in code factory. Bug: v8:8562, v8:8553 Change-Id: If1f13bbaf7e42453b3235cc97c58ada91b5fa7b8 Reviewed-on: https://chromium-review.googlesource.com/c/1373552Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#58212}
-
- 11 Dec, 2018 2 commits
-
-
Sven Sauleau authored
Uses the JavaScript BigInt Object to represent Wasm's 64bits integers. Attention, 32 bits architectures are not supported yet. Bug: v8:7741 Change-Id: I28b718fa567bca5103b2f38a879049cd20a46f12 Reviewed-on: https://chromium-review.googlesource.com/c/1355144 Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#58152}
-
Clemens Hammacher authored
The class declaration regexp in cpplint did not catch classes decorated by V8_EXPORT, V8_EXPORT_PRIVATE or any other decorator containing digits. This will be fixed in https://github.com/google/styleguide/pull/422. This CL already prepares the code base by fixing all errors that will be found after that change. Some follow-up changes were needed to fix implicit conversion that are not taken any more now. R=mstarzinger@chromium.org Bug: v8:8562 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: I03713bd04dbc3f54b89a6c857a93463139aa5efd Reviewed-on: https://chromium-review.googlesource.com/c/1367751Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#58143}
-
- 04 Dec, 2018 1 commit
-
-
Jakob Gruber authored
This is the first (and major) step towards converting CallApiCallback and CallApiGetter stubs into builtins. The CallApiCallbackStub was parameterized with the number of arguments passed on the stack. This CL converts the compile-time parameter into an explicit runtime parameter, and removes all uses of the stub parameter. Drive-by: The implementation is now mostly consistent across platforms. Drive-by: Refactor the calling convention to free up two registers (kCallData and kHolder are now passed on the stack). Bug: v8:7777 Change-Id: I212dccc2930de89c264a13755918c9fae7842f1f Reviewed-on: https://chromium-review.googlesource.com/c/1354887 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#58005}
-
- 01 Dec, 2018 1 commit
-
-
Jakob Kummerow authored
While strictly speaking it is legal (though useless) to dynamically create zero-length arrays with "new T[0]", UBSan does not like it, so this CL avoids doing it. It fixes the error: ../../src/allocation.h:41:34: runtime error: constructor call on address 0x... with insufficient space for an object of type 'unsigned char' Bug: v8:3770 Change-Id: I5017767c59df0d8928f7493f92d2d04519083964 Reviewed-on: https://chromium-review.googlesource.com/c/1356902Reviewed-by: Bill Budge <bbudge@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#57984}
-
- 30 Nov, 2018 2 commits
-
-
Jakob Gruber authored
Bug: v8:8503, v8:7777 Change-Id: Iadf515cf4735d1046c7c14f44c02d5d5f95df87a Reviewed-on: https://chromium-review.googlesource.com/c/1356512Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#57969}
-
Aseem Garg authored
This is a reland of 9436e8a8 This CL simplifies the wasm/futex.js test so that it doesn't push the limits of d8. Original change's description: > [wasm] Add I64AtomicWait implementation > > Bug=v8:8075 > R=adamk@chromium.org,binji@chromium.org > > Change-Id: I11ef5daccd043123b23e60c93ee0df79cabe9ccd > Reviewed-on: https://chromium-review.googlesource.com/c/1342948 > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Ben Smith <binji@chromium.org> > Commit-Queue: Aseem Garg <aseemgarg@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57917} Change-Id: Ifd26f1ecdb9fe24a1896162bb4d4285f9188a9ba Reviewed-on: https://chromium-review.googlesource.com/c/1351304 Commit-Queue: Aseem Garg <aseemgarg@chromium.org> Reviewed-by: Ben Smith <binji@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#57953}
-
- 29 Nov, 2018 1 commit
-
-
Aseem Garg authored
This reverts commit 9436e8a8. Reason for revert: Breaks TSAN. Original change's description: > [wasm] Add I64AtomicWait implementation > > Bug=v8:8075 > R=adamk@chromium.org,binji@chromium.org > > Change-Id: I11ef5daccd043123b23e60c93ee0df79cabe9ccd > Reviewed-on: https://chromium-review.googlesource.com/c/1342948 > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Ben Smith <binji@chromium.org> > Commit-Queue: Aseem Garg <aseemgarg@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57917} TBR=binji@chromium.org,adamk@chromium.org,aseemgarg@chromium.org Change-Id: Ic82ce8794410a0d4d19de07abd9bb8a7aaff1c1c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/1351303Reviewed-by: Aseem Garg <aseemgarg@chromium.org> Commit-Queue: Aseem Garg <aseemgarg@chromium.org> Cr-Commit-Position: refs/heads/master@{#57919}
-
- 28 Nov, 2018 1 commit
-
-
Aseem Garg authored
Bug=v8:8075 R=adamk@chromium.org,binji@chromium.org Change-Id: I11ef5daccd043123b23e60c93ee0df79cabe9ccd Reviewed-on: https://chromium-review.googlesource.com/c/1342948Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Ben Smith <binji@chromium.org> Commit-Queue: Aseem Garg <aseemgarg@chromium.org> Cr-Commit-Position: refs/heads/master@{#57917}
-
- 20 Nov, 2018 1 commit
-
-
Aseem Garg authored
Bug=v8:8075 R=adamk@chromium.org,binji@chromium.org Change-Id: I2367e24888a268ce93b1730195cb4767896861cc Reviewed-on: https://chromium-review.googlesource.com/c/1341126Reviewed-by: Ben Smith <binji@chromium.org> Commit-Queue: Aseem Garg <aseemgarg@chromium.org> Cr-Commit-Position: refs/heads/master@{#57624}
-
- 19 Nov, 2018 2 commits
-
-
Aseem Garg authored
Bug=v8:8075 R=adamk@chromium.org Change-Id: Ib7b18448d59e1f54f664e24908fbd3a8b4607a9f Reviewed-on: https://chromium-review.googlesource.com/c/1332153 Commit-Queue: Aseem Garg <aseemgarg@chromium.org> Reviewed-by: Ben Smith <binji@chromium.org> Cr-Commit-Position: refs/heads/master@{#57623}
-
Clemens Hammacher authored
Instead, include macro-assembler.h (and others) where needed. R=mstarzinger@chromium.org Bug: v8:8238, v8:7490 Change-Id: I6ba4420bafee3d937bc6b648ac907f30a1d6aa52 Reviewed-on: https://chromium-review.googlesource.com/c/1340280Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57599}
-
- 29 Oct, 2018 1 commit
-
-
Clemens Hammacher authored
The "grow_memory" opcode was renamed to "memory.grow", and the spec repo was updated to use kExprMemoryGrow internally instead of kExprGrowMemory (https://github.com/WebAssembly/spec/pull/720). This CL does the same change for v8. Drive-by: Rename "current_size" to "memory.size", and a minor cleanup in wasm-graph-builder.js to bring it in line with the version in the js-api tests in the spec repo. R=titzer@chromium.org Change-Id: If525dba898b2c248890a616d3392c22b45f698ef Reviewed-on: https://chromium-review.googlesource.com/c/1302057Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#57089}
-
- 23 Oct, 2018 1 commit
-
-
Michael Starzinger authored
R=ulan@chromium.org Change-Id: I73f6fc0baee8e1219a88d4d8f594bba16e64f332 Reviewed-on: https://chromium-review.googlesource.com/c/1296480Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#56904}
-
- 10 Oct, 2018 1 commit
-
-
Benedikt Meurer authored
This change introduces new intrinsics used to desugar async functions in the Parser and the BytecodeGenerator, namely we introduce a new %_AsyncFunctionEnter intrinsic that constructs the generator object for the async function (and in the future will also create the outer promise for the async function). This generator object is internal and never escapes to user code, plus since async functions don't have a "prototype" property, we can just a single map here instead of tracking the prototype/initial_map on every async function. This saves one word per async function plus one initial_map per async function that was invoked at least once. We also introduce two new intrinsics %_AsyncFunctionReject, which rejects the outer promise with the caught exception, and another %_AsyncFunctionResolve, which resolves the outer promise with the right hand side of the `return` statement. These functions also perform the DevTools part of the job (aka popping from the promise stack and sending the debug event). This allows us to get rid of the implicit try-finally from async functions completely; because the finally block only called to the %AsyncFunctionPromiseRelease builtin, which was used to inform DevTools. In essence we now turn an async function like ```js async function f(x) { return await bar(x); } ``` into something like this (in Parser and BytecodeGenerator respectively): ``` function f(x) { .generator_object = %_AsyncFunctionEnter(.closure, this); .promise = %AsyncFunctionCreatePromise(); try { .tmp = await bar(x); return %_AsyncFunctionResolve(.promise, .tmp); } catch (e) { return %_AsyncFunctionReject(.promise, e); } } ``` Overall the bytecode for async functions gets significantly shorter already (and will get even shorter once we put the outer promise into the async function generator object). For example the bytecode for a simple async function ```js async function f(x) { return await x; } ``` goes from 175 bytes to 110 bytes (a ~38% reduction in size), which is in particular due to the simplification around the try-finally removal. Overall this seems to improve the doxbee-async-es2017-native test by around 2-3%. On the test case mentioned in v8:8276 we go from 1124ms to 441ms, which corresponds to a 60% reduction in total execution time! Tbr: marja@chromium.org Bug: v8:7253, v8:7522, v8:8276 Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Id29dc92de7490b387ff697860c900cee44c9a7a4 Reviewed-on: https://chromium-review.googlesource.com/c/1269041 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#56502}
-
- 25 Sep, 2018 1 commit
-
-
Michael Starzinger authored
This reduces the size a "Throw" or "Rethrow" takes in generated code by switching from runtime calls to using WebAssembly runtime stubs. It also removes a specialized runtime function and instead uses {Runtime_Throw} which is generic and used by all code (including JavaScript code). R=clemensh@chromium.org BUG=v8:8091 Change-Id: Id4f637525f2ea9d81227931b1290d90ca5f376d1 Reviewed-on: https://chromium-review.googlesource.com/1243106 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#56215}
-
- 20 Sep, 2018 1 commit
-
-
Florian Sattler authored
Fixing clang-tidy warning. Bug: v8:8015 Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng Change-Id: Ibc5124e06f5774e7695029e2d21084a7efb965e6 Reviewed-on: https://chromium-review.googlesource.com/1224412 Commit-Queue: Florian Sattler <sattlerf@google.com> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#56065}
-
- 14 Sep, 2018 1 commit
-
-
Benedikt Meurer authored
This adds support to TurboFan's representation selection for the Word64 representation, and makes use of that to handle indices for memory access and allocation instructions (i.e. LoadElement, StoreElement, Allocate, etc.). These instructions had previously used Word32 as representation for the indices / sizes, and then internally converted it to the correct representation (aka Word64 on 64-bit architectures) later on, but that was kind of brittle, and sometimes led to weird generated code. The change thus only adds support to convert integer values in the safe integer range from all kinds of representations to Word64 (on 64-bit architectures). We don't yet handle the opposite direction and none of the representation selection heuristics for the numeric operations were changed so far. This will be done in follow-up CLs. This CL itself is supposed to be neutral wrt. functionality, and only serves as a starting point, and a cleanup for the (weird) implicit Word64 index/size handling. Bug: v8:7881, v8:8015, v8:8171 Design-Document: http://bit.ly/turbofan-word64 Change-Id: I3c6961a0e96cbc3fb8ac9d3e1be8f2e5c89bfd25 Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel Reviewed-on: https://chromium-review.googlesource.com/1224932 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#55886}
-
- 10 Sep, 2018 1 commit
-
-
jgruber authored
To support all possible cases, we must limit the number of register args for TFS builtins on ia32 to 3. Out of the 6 allocatable registers, esi is taken as the context register and ebx is the root register. One register must remain available to store the jump/call target. Thus 3 registers remain for arguments. The reason this applies to TFS builtins specifically is because this becomes relevant for builtins used as targets of Torque function pointers (which must have a register available to store the target). Bug: v8:6666 Change-Id: I17d9450cc29c983ddaffc2deb36f45c1c414e166 Reviewed-on: https://chromium-review.googlesource.com/1209287 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#55759}
-
- 03 Sep, 2018 3 commits
-
-
jgruber authored
Now that we've removed kRootRegister from all ia32 interface descriptors, let's make sure it does not sneak back in. Bug: v8:6666 Change-Id: Ie3528908a142c36f106b0053041ed974216533d4 Reviewed-on: https://chromium-review.googlesource.com/1202083 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#55590}
-
jgruber authored
The isolate can be efficiently loaded through other means: either as a root-relative load (if embedded builtins are enabled), or as an embedded external reference (i.e. the absolute pointer is included in the instruction stream) otherwise. The generated code should be at least as fast as previously. On x64 (with embedded builtins): Before: // Register moves in prologue: 0x7f47a6b4860a a 488955e0 REX.W movq [rbp-0x20],rdx // And the load from a stack slot at each use-site. 0x7f47a6b486f2 f2 488b7de0 REX.W movq rdi,[rbp-0x20] After: // Each use-site just loads a root-relative offset. 0x7f1645fcc6ce ee 498dbd38ffffff REX.W leaq rdi,[r13-0xc8] On ia32 (no embedded builtins), before: 0x5c608930 10 8955f0 mov [ebp-0x10],edx 0x5c6089fb db 891424 mov [esp],edx After: 0x41d0898d 8d b80033b156 mov eax,0x56b13300 Removal reduces register pressure, and frees up ebx as the root register on ia32. Note that the set of allocatable registers was only reduced on ia32 to exclude the root register. Bug: v8:6666 Change-Id: I14e401e2823c82042c76acae10c3c935b9982993 Reviewed-on: https://chromium-review.googlesource.com/1201586 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#55587}
-
jgruber authored
In preparation for kRootRegister support on ia32. Instead of pushing the register args first thing within the builtin to free up needed scratch registers, we just pass the last 3 arguments on the stack. Drive-by: Update documentation of helper function. Bug: v8:6666 Change-Id: I4a194d6885ac9cdfb9f5e66d687522442fae39ba Reviewed-on: https://chromium-review.googlesource.com/1199025 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#55585}
-
- 31 Aug, 2018 2 commits
-
-
jgruber authored
This reorders arguments in preparation for removing ebx from its calling convention (in a follow-up some args will be passed on the stack). Drive-by: Improve readability in the code handling different cases (array,spread,...). Bug: v8:6666 Change-Id: I0160f8efafd0fd0e841739578e01c32b38adb66e Reviewed-on: https://chromium-review.googlesource.com/1196884Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#55557}
-
jgruber authored
In preparation for kRootRegister support on ia32. For both descriptors we simply shuffle registers around to remove ebx from the calling convention. Possible follow-up work: The ApiCallbackDescriptor could be simplified by passing call_data (and the Undefined constant) on the stack. This currently happens in the builtin body. Drive-by: Minor refactoring in InterpreterPushArgsMode to deobfuscate the different paths (spread/no-spread). Also use {Push,Pop}ReturnAddress helpers. Bug: v8:6666 Change-Id: I25fd738501fff71c038a0745cec04363f90df660 Reviewed-on: https://chromium-review.googlesource.com/1196552Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#55554}
-
- 29 Aug, 2018 2 commits
-
-
jgruber authored
This replaces ebx usage in several more interface descriptors. - IC descriptors already passed most arguments on the stack (updated their Register accessors to reflect that). - The allocation site argument appears to be unused in the ConstructStub descriptor. It can probably be removed in a follow-up. Drive-by: Rename ArgumentAdaptorDescriptor to ArgumentsAdaptorDescriptor to match the builtin name. Bug: v8:6666 Change-Id: I4cdf1775a5b4b74491d6d303c49a8af9b6cd3c03 Reviewed-on: https://chromium-review.googlesource.com/1195367 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#55495}
-
jgruber authored
In preparation for kRootRegister support on ia32. LoadWithVector now passes the vector on the stack. LoadGlobalWithVector is able to reuse edx (used as ReceiverRegister in LoadWithVector). Drive-by: Aliasing DCHECKs and updated unused Register accessors. Bug: v8:6666 Change-Id: If0e93d22c3c11f764bc0805c3e6a51654cdcc5f9 Reviewed-on: https://chromium-review.googlesource.com/1193891 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#55490}
-
- 28 Aug, 2018 1 commit
-
-
jgruber authored
These two builtins are a special case in that their calling convention must be kept in-sync since they are both generated from Generate_CallOrConstructVarargs. ConstructVarargs in particular used all available registers. In order to free ebx, the calling convention is changed to pass the last argument on the stack. As part of this change, the order of the last two arguments is swapped since the stack parameter must be tagged. Bug: v8:6666 Change-Id: If1ad14fc09693c36dd63ffebb6f34fcd3f012896 Reviewed-on: https://chromium-review.googlesource.com/1193444Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#55458}
-
- 24 Aug, 2018 1 commit
-
-
jgruber authored
Prior to this, it was possible to explicitly specify machine types for stack arguments, but these were simply ignored and treated as tagged-by-default when creating the actual CallDescriptor. This verifies that all stack args specified in the descriptor are actually given tagged types, and fails early if that is not the case. Bug: v8:6666 Change-Id: Idb543a11c976d0260fea60d31e30c21b15b32256 Reviewed-on: https://chromium-review.googlesource.com/1186642Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#55380}
-
- 23 Aug, 2018 1 commit
-
-
jgruber authored
This is another step towards a kRootRegister on ia32 and removes kRootRegister from generic interface descriptors. Drive-by: Better error message for type mismatches in machine graph verification. Drive-by: Use PreserveRootIA32 register config for all builtins. Bug: v8:6666 Change-Id: I920d4d6f3085da9734f6aa3bd3ee020abbc289fc Reviewed-on: https://chromium-review.googlesource.com/1186330Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#55338}
-
- 20 Jul, 2018 1 commit
-
-
Caitlin Potter authored
As discussed in https://docs.google.com/document/d/1sBdGe8RHgeYP850cKSSgGABTyfMdvaEWLy-vertuTCo/edit?ts=5b3ba5cc#, this CL introduces a new bytecode (CloneObject), and a new IC type. In this prototype implementation, the type feedback looks like the following: Uninitialized case: { uninitialized_sentinel, uninitialized_sentinel } Monomorphic case: { weak 'source' map, strong 'result' map } Polymorphic case: { WeakFixedArray with { weak 'source' map, strong 'result' map }, cleared value } Megamorphic case: { megamorphic_sentinel, cleared_Value } In the fast case, Object cloning is done by allocating an object with the saved result map, and a shallow clone of the fast properties from the source object, as well as cloned fast elements from the source object. If at any point the fast case can't be taken, the IC transitions to the slow case and remains there. This prototype CL does not include any TurboFan optimization, and the CloneObject operation is merely reduced to a stub call. It may still be possible to get some further improvements by somehow incorporating compile-time boilerplate elements into the cloned object, or simplifying how the boilerplate elements are inserted into the object. In terms of performance, we improve the ObjectSpread score in JSTests/ObjectLiteralSpread/ by about 8x, with substantial improvements over the Babel and ObjectAssign scores. R=gsathya@chromium.org, mvstanton@chromium.org, rmcilroy@chromium.org, neis@chromium.org, bmeurer@chromium.org BUG=v8:7611 Change-Id: I79e1796eb77016fb4feba0e1d3bb9abb348c183e Reviewed-on: https://chromium-review.googlesource.com/1127472 Commit-Queue: Caitlin Potter <caitp@igalia.com> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#54595}
-
- 22 Jun, 2018 1 commit
-
-
Igor Sheludko authored
Bug: v8:5269, v8:7754 Change-Id: Iadbf7e1174e4cfe9f53310e7e499cc90ed27843b Reviewed-on: https://chromium-review.googlesource.com/1110372 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#53964}
-