Reviewers: Benedikt Meurer, dstence, michael_dawson,
Description:
PPC: [turbofan] First step towards sanitizing for-in and making it
optimizable.
Port e2e47f30be06e6ea6b8a3cc90138381914ecd07d
Original commit message:
In a nutshell: The FILTER_KEY builtin is gone, and was replaced by a
simple runtime call to ForInFilter, which does everything and is even
cheaper (because FILTER_KEY used to call into the runtime anyway).
And ForInFilter returns either the name or undefined, which makes it
possible to remove the control flow construction from the AstGraphBuilder,
and thereby make both the initialization and the per-loop code of for-in
optimizable later (in typed lowering).
[email protected], [email protected], [email protected]
BUG=
Please review this at https://codereview.chromium.org/1160973004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -2 lines):
M src/ppc/full-codegen-ppc.cc
Index: src/ppc/full-codegen-ppc.cc
diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc
index
c6dbb826500694cda97560c8bb3c9a0597be15ce..ef698481307a83f899c17b64da30611c8bf19b56
100644
--- a/src/ppc/full-codegen-ppc.cc
+++ b/src/ppc/full-codegen-ppc.cc
@@ -1232,10 +1232,11 @@ void
FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// any more. If the property has been removed while iterating, we
// just skip it.
__ Push(r4, r6); // Enumerable and current entry.
- __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION);
+ __ CallRuntime(Runtime::kForInFilter, 2);
PrepareForBailoutForId(stmt->FilterId(), TOS_REG);
__ mr(r6, r3);
- __ cmpi(r6, Operand::Zero());
+ __ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
+ __ cmp(r3, r0);
__ beq(loop_statement.continue_label());
// Update the 'each' property or variable from the possibly filtered
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.