Commit 7f7cff33 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[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.

R=jarin@chromium.org
BUG=chromium:467531
LOG=N

Review URL: https://codereview.chromium.org/1011123002

Cr-Commit-Position: refs/heads/master@{#27240}
parent d3fb7bf8
......@@ -1497,17 +1497,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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment