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

Side by Side Diff: src/ast.h

Issue 1083193005: WIP: new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix return from new func Created 5 years, 8 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 | « no previous file | 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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 return var_; 1660 return var_;
1661 } 1661 }
1662 void set_var(Variable* v) { 1662 void set_var(Variable* v) {
1663 DCHECK(!is_resolved()); 1663 DCHECK(!is_resolved());
1664 DCHECK_NOT_NULL(v); 1664 DCHECK_NOT_NULL(v);
1665 var_ = v; 1665 var_ = v;
1666 } 1666 }
1667 1667
1668 bool is_this() const { return IsThisField::decode(bit_field_); } 1668 bool is_this() const { return IsThisField::decode(bit_field_); }
1669 1669
1670 bool is_new_target() const { return IsNewTargetField::decode(bit_field_); }
1671
1670 bool is_assigned() const { return IsAssignedField::decode(bit_field_); } 1672 bool is_assigned() const { return IsAssignedField::decode(bit_field_); }
1671 void set_is_assigned() { 1673 void set_is_assigned() {
1672 bit_field_ = IsAssignedField::update(bit_field_, true); 1674 bit_field_ = IsAssignedField::update(bit_field_, true);
1673 } 1675 }
1674 1676
1675 bool is_resolved() const { return IsResolvedField::decode(bit_field_); } 1677 bool is_resolved() const { return IsResolvedField::decode(bit_field_); }
1676 void set_is_resolved() { 1678 void set_is_resolved() {
1677 bit_field_ = IsResolvedField::update(bit_field_, true); 1679 bit_field_ = IsResolvedField::update(bit_field_, true);
1678 } 1680 }
1679 1681
(...skipping 19 matching lines...) Expand all
1699 1701
1700 protected: 1702 protected:
1701 VariableProxy(Zone* zone, Variable* var, int start_position, 1703 VariableProxy(Zone* zone, Variable* var, int start_position,
1702 int end_position); 1704 int end_position);
1703 1705
1704 VariableProxy(Zone* zone, const AstRawString* name, 1706 VariableProxy(Zone* zone, const AstRawString* name,
1705 Variable::Kind variable_kind, int start_position, 1707 Variable::Kind variable_kind, int start_position,
1706 int end_position); 1708 int end_position);
1707 1709
1708 class IsThisField : public BitField8<bool, 0, 1> {}; 1710 class IsThisField : public BitField8<bool, 0, 1> {};
1709 class IsAssignedField : public BitField8<bool, 1, 1> {}; 1711 class IsNewTargetField : public BitField8<bool, 1, 1> {};
1710 class IsResolvedField : public BitField8<bool, 2, 1> {}; 1712 class IsAssignedField : public BitField8<bool, 2, 1> {};
1713 class IsResolvedField : public BitField8<bool, 3, 1> {};
1711 1714
1712 // Start with 16-bit (or smaller) field, which should get packed together 1715 // Start with 16-bit (or smaller) field, which should get packed together
1713 // with Expression's trailing 16-bit field. 1716 // with Expression's trailing 16-bit field.
1714 uint8_t bit_field_; 1717 uint8_t bit_field_;
1715 FeedbackVectorICSlot variable_feedback_slot_; 1718 FeedbackVectorICSlot variable_feedback_slot_;
1716 union { 1719 union {
1717 const AstRawString* raw_name_; // if !is_resolved_ 1720 const AstRawString* raw_name_; // if !is_resolved_
1718 Variable* var_; // if is_resolved_ 1721 Variable* var_; // if is_resolved_
1719 }; 1722 };
1720 // Position is stored in the AstNode superclass, but VariableProxy needs to 1723 // Position is stored in the AstNode superclass, but VariableProxy needs to
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
3584 3587
3585 private: 3588 private:
3586 Zone* zone_; 3589 Zone* zone_;
3587 AstValueFactory* ast_value_factory_; 3590 AstValueFactory* ast_value_factory_;
3588 }; 3591 };
3589 3592
3590 3593
3591 } } // namespace v8::internal 3594 } } // namespace v8::internal
3592 3595
3593 #endif // V8_AST_H_ 3596 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698