Reviewers: jarin,
Description:
[turbofan] Follow-up to evaluation order in AstGraphBuilder.
The evaluation order of receiver versus arguments is not properly
defined by C++. This caused issues with Clang where the environment
changed after the receiveing environment was already loaded.
[email protected]
BUG=chromium:467531
LOG=N
Please review this at https://codereview.chromium.org/1011123002/
Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-cr-467531
Affected files (+5, -5 lines):
M src/compiler/ast-graph-builder.cc
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc
b/src/compiler/ast-graph-builder.cc
index
de01e24ab8fd226c59fe0538d72e2a3fd0313eab..6a6361ba2f1390d73cde8c66a36bc8e223e0adc2
100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1408,17 +1408,17 @@ void
AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) {
environment()->Push(property->is_static() ? literal : proto);
VisitForValue(property->key());
- environment()->Push(
- BuildToName(environment()->Pop(), expr->GetIdForProperty(i)));
+ Node* name = BuildToName(environment()->Pop(),
expr->GetIdForProperty(i));
+ environment()->Push(name);
// The static prototype property is read only. We handle the non
computed
// property name case in the parser. Since this is the only case where
we
// need to check for an own read only property we special case this so
we do
// not need to do this for every property.
if (property->is_static() && property->is_computed_name()) {
- Node* name = environment()->Pop();
- environment()->Push(
- BuildThrowIfStaticPrototype(name, expr->GetIdForProperty(i)));
+ Node* check = BuildThrowIfStaticPrototype(environment()->Pop(),
+ expr->GetIdForProperty(i));
+ environment()->Push(check);
}
VisitForValue(property->value());
--
--
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.