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

Side by Side Diff: src/ast.h

Issue 352583008: Rollback to Version 3.28.4 (based on bleeding_edge revision r22031) (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/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_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 class VariableProxy V8_FINAL : public Expression { 1621 class VariableProxy V8_FINAL : public Expression {
1622 public: 1622 public:
1623 DECLARE_NODE_TYPE(VariableProxy) 1623 DECLARE_NODE_TYPE(VariableProxy)
1624 1624
1625 virtual bool IsValidReferenceExpression() const V8_OVERRIDE { 1625 virtual bool IsValidReferenceExpression() const V8_OVERRIDE {
1626 return var_ == NULL ? true : var_->IsValidReference(); 1626 return var_ == NULL ? true : var_->IsValidReference();
1627 } 1627 }
1628 1628
1629 bool IsArguments() const { return var_ != NULL && var_->is_arguments(); } 1629 bool IsArguments() const { return var_ != NULL && var_->is_arguments(); }
1630 1630
1631 bool IsLValue() const { return is_lvalue_; }
1632
1631 Handle<String> name() const { return name_->string(); } 1633 Handle<String> name() const { return name_->string(); }
1632 const AstRawString* raw_name() const { return name_; } 1634 const AstRawString* raw_name() const { return name_; }
1633 Variable* var() const { return var_; } 1635 Variable* var() const { return var_; }
1634 bool is_this() const { return is_this_; } 1636 bool is_this() const { return is_this_; }
1635 Interface* interface() const { return interface_; } 1637 Interface* interface() const { return interface_; }
1636 1638
1637 bool is_assigned() const { return is_assigned_; } 1639
1638 void set_is_assigned() { is_assigned_ = true; } 1640 void MarkAsTrivial() { is_trivial_ = true; }
1641 void MarkAsLValue() { is_lvalue_ = true; }
1639 1642
1640 // Bind this proxy to the variable var. Interfaces must match. 1643 // Bind this proxy to the variable var. Interfaces must match.
1641 void BindTo(Variable* var); 1644 void BindTo(Variable* var);
1642 1645
1643 protected: 1646 protected:
1644 VariableProxy(Zone* zone, Variable* var, int position); 1647 VariableProxy(Zone* zone, Variable* var, int position);
1645 1648
1646 VariableProxy(Zone* zone, 1649 VariableProxy(Zone* zone,
1647 const AstRawString* name, 1650 const AstRawString* name,
1648 bool is_this, 1651 bool is_this,
1649 Interface* interface, 1652 Interface* interface,
1650 int position); 1653 int position);
1651 1654
1652 const AstRawString* name_; 1655 const AstRawString* name_;
1653 Variable* var_; // resolved variable, or NULL 1656 Variable* var_; // resolved variable, or NULL
1654 bool is_this_; 1657 bool is_this_;
1655 bool is_assigned_; 1658 bool is_trivial_;
1659 // True if this variable proxy is being used in an assignment
1660 // or with a increment/decrement operator.
1661 bool is_lvalue_;
1656 Interface* interface_; 1662 Interface* interface_;
1657 }; 1663 };
1658 1664
1659 1665
1660 class Property V8_FINAL : public Expression { 1666 class Property V8_FINAL : public Expression {
1661 public: 1667 public:
1662 DECLARE_NODE_TYPE(Property) 1668 DECLARE_NODE_TYPE(Property)
1663 1669
1664 virtual bool IsValidReferenceExpression() const V8_OVERRIDE { return true; } 1670 virtual bool IsValidReferenceExpression() const V8_OVERRIDE { return true; }
1665 1671
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 private: 3430 private:
3425 Zone* zone_; 3431 Zone* zone_;
3426 Visitor visitor_; 3432 Visitor visitor_;
3427 AstValueFactory* ast_value_factory_; 3433 AstValueFactory* ast_value_factory_;
3428 }; 3434 };
3429 3435
3430 3436
3431 } } // namespace v8::internal 3437 } } // namespace v8::internal
3432 3438
3433 #endif // V8_AST_H_ 3439 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698