[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}
This commit is contained in:
parent
d3fb7bf809
commit
7f7cff33f3
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user