Reviewers: rossberg, wingo,
Message:
Here's a quick go at it, it passes the test and reproduction locally
Description:
[es6] disable optimization in lazily parsed arrows with rest params
BUG=508074
LOG=N
[email protected], [email protected]
Please review this at https://codereview.chromium.org/1214843005/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -3 lines):
M src/parser.cc
M test/mjsunit/mjsunit.status
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index
55b4122d71f8cbcccc2d04e8c5d494ef01e508a1..26c187292011337bb265bfa51476aee319b32c4e
100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -1216,6 +1216,10 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate,
ParseInfo* info,
// must produce a FunctionLiteral.
DCHECK(expression->IsFunctionLiteral());
result = expression->AsFunctionLiteral();
+ if (scope->has_rest_parameter()) {
+ // TODO(caitp): enable optimization of functions with rest
params
+ result->set_dont_optimize_reason(kRestParameter);
+ }
} else {
ok = false;
}
Index: test/mjsunit/mjsunit.status
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
index
2937729c2cc2f431003b20032eed070a5d41a551..0309e5ecf243f4e4243315637a707c4a9c3c6f5f
100644
--- a/test/mjsunit/mjsunit.status
+++ b/test/mjsunit/mjsunit.status
@@ -244,9 +244,6 @@
# BUG(v8:3838).
'regress/regress-3116': [PASS, ['isolates', FLAKY]],
-
- # BUG(chromium:508074). Remove this once the issue is fixed.
- 'harmony/arrow-rest-params': [PASS, NO_VARIANTS],
}], # ALWAYS
['novfp3 == True', {
--
--
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.