Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)
Patch Set: whitespace Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 NewNode(op, receiver, key, value, attr); 1644 NewNode(op, receiver, key, value, attr);
1645 break; 1645 break;
1646 } 1646 }
1647 case ClassLiteral::Property::SETTER: { 1647 case ClassLiteral::Property::SETTER: {
1648 Node* attr = jsgraph()->Constant(DONT_ENUM); 1648 Node* attr = jsgraph()->Constant(DONT_ENUM);
1649 const Operator* op = javascript()->CallRuntime( 1649 const Operator* op = javascript()->CallRuntime(
1650 Runtime::kDefineSetterPropertyUnchecked, 4); 1650 Runtime::kDefineSetterPropertyUnchecked, 4);
1651 NewNode(op, receiver, key, value, attr); 1651 NewNode(op, receiver, key, value, attr);
1652 break; 1652 break;
1653 } 1653 }
1654 case ClassLiteral::Property::FIELD: {
1655 UNREACHABLE();
1656 break;
1657 }
1654 } 1658 }
1655 } 1659 }
1656 1660
1657 // Set the constructor to have fast properties. 1661 // Set the constructor to have fast properties.
1658 prototype = environment()->Pop(); 1662 prototype = environment()->Pop();
1659 literal = environment()->Pop(); 1663 literal = environment()->Pop();
1660 const Operator* op = javascript()->CallRuntime(Runtime::kToFastProperties); 1664 const Operator* op = javascript()->CallRuntime(Runtime::kToFastProperties);
1661 literal = NewNode(op, literal); 1665 literal = NewNode(op, literal);
1662 1666
1663 // Assign to class variable. 1667 // Assign to class variable.
(...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after
4329 // Phi does not exist yet, introduce one. 4333 // Phi does not exist yet, introduce one.
4330 value = NewPhi(inputs, value, control); 4334 value = NewPhi(inputs, value, control);
4331 value->ReplaceInput(inputs - 1, other); 4335 value->ReplaceInput(inputs - 1, other);
4332 } 4336 }
4333 return value; 4337 return value;
4334 } 4338 }
4335 4339
4336 } // namespace compiler 4340 } // namespace compiler
4337 } // namespace internal 4341 } // namespace internal
4338 } // namespace v8 4342 } // namespace v8
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698