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

Side by Side Diff: src/ast/ast.h

Issue 2663513002: [objects.h splitting] Move out ConstantElementsPair and BoileplateDescriptor. (Closed)
Patch Set: moving constant_elements_kind to ast.cc Created 3 years, 10 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 | « BUILD.gn ('k') | src/ast/ast.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_AST_AST_H_ 5 #ifndef V8_AST_AST_H_
6 #define V8_AST_AST_H_ 6 #define V8_AST_AST_H_
7 7
8 #include "src/ast/ast-types.h" 8 #include "src/ast/ast-types.h"
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/modules.h" 10 #include "src/ast/modules.h"
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 }; 1547 };
1548 1548
1549 1549
1550 // An array literal has a literals object that is used 1550 // An array literal has a literals object that is used
1551 // for minimizing the work when constructing it at runtime. 1551 // for minimizing the work when constructing it at runtime.
1552 class ArrayLiteral final : public MaterializedLiteral { 1552 class ArrayLiteral final : public MaterializedLiteral {
1553 public: 1553 public:
1554 Handle<ConstantElementsPair> constant_elements() const { 1554 Handle<ConstantElementsPair> constant_elements() const {
1555 return constant_elements_; 1555 return constant_elements_;
1556 } 1556 }
1557 ElementsKind constant_elements_kind() const { 1557 ElementsKind constant_elements_kind() const;
1558 return static_cast<ElementsKind>(constant_elements()->elements_kind());
1559 }
1560 1558
1561 ZoneList<Expression*>* values() const { return values_; } 1559 ZoneList<Expression*>* values() const { return values_; }
1562 1560
1563 BailoutId CreateLiteralId() const { return BailoutId(local_id(0)); } 1561 BailoutId CreateLiteralId() const { return BailoutId(local_id(0)); }
1564 1562
1565 // Return an AST id for an element that is used in simulate instructions. 1563 // Return an AST id for an element that is used in simulate instructions.
1566 BailoutId GetIdForElement(int i) { return BailoutId(local_id(i + 1)); } 1564 BailoutId GetIdForElement(int i) { return BailoutId(local_id(i + 1)); }
1567 1565
1568 // Unlike other AST nodes, this number of bailout IDs allocated for an 1566 // Unlike other AST nodes, this number of bailout IDs allocated for an
1569 // ArrayLiteral can vary, so num_ids() is not a static method. 1567 // ArrayLiteral can vary, so num_ids() is not a static method.
(...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after
3647 : NULL; \ 3645 : NULL; \
3648 } 3646 }
3649 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) 3647 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS)
3650 #undef DECLARE_NODE_FUNCTIONS 3648 #undef DECLARE_NODE_FUNCTIONS
3651 3649
3652 3650
3653 } // namespace internal 3651 } // namespace internal
3654 } // namespace v8 3652 } // namespace v8
3655 3653
3656 #endif // V8_AST_AST_H_ 3654 #endif // V8_AST_AST_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698