Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2084 | 2084 |
| 2085 bool pretenure() { return Pretenure::decode(bitfield_); } | 2085 bool pretenure() { return Pretenure::decode(bitfield_); } |
| 2086 void set_pretenure() { bitfield_ |= Pretenure::encode(true); } | 2086 void set_pretenure() { bitfield_ |= Pretenure::encode(true); } |
| 2087 | 2087 |
| 2088 bool has_duplicate_parameters() { | 2088 bool has_duplicate_parameters() { |
| 2089 return HasDuplicateParameters::decode(bitfield_); | 2089 return HasDuplicateParameters::decode(bitfield_); |
| 2090 } | 2090 } |
| 2091 | 2091 |
| 2092 bool is_function() { return IsFunction::decode(bitfield_) == kIsFunction; } | 2092 bool is_function() { return IsFunction::decode(bitfield_) == kIsFunction; } |
| 2093 | 2093 |
| 2094 bool is_parenthesized() { | 2094 bool is_parenthesized() { |
|
ulan
2012/08/16 10:20:03
Maybe add a comment describing the cases when this
Michael Starzinger
2012/08/16 11:19:21
Done.
| |
| 2095 return IsParenthesized::decode(bitfield_) == kIsParenthesized; | 2095 return IsParenthesized::decode(bitfield_) == kIsParenthesized; |
| 2096 } | 2096 } |
| 2097 void set_parenthesized() { | |
| 2098 bitfield_ = IsParenthesized::update(bitfield_, kIsParenthesized); | |
| 2099 } | |
| 2097 | 2100 |
| 2098 int ast_node_count() { return ast_properties_.node_count(); } | 2101 int ast_node_count() { return ast_properties_.node_count(); } |
| 2099 AstProperties::Flags* flags() { return ast_properties_.flags(); } | 2102 AstProperties::Flags* flags() { return ast_properties_.flags(); } |
| 2100 void set_ast_properties(AstProperties* ast_properties) { | 2103 void set_ast_properties(AstProperties* ast_properties) { |
| 2101 ast_properties_ = *ast_properties; | 2104 ast_properties_ = *ast_properties; |
| 2102 } | 2105 } |
| 2103 | 2106 |
| 2104 protected: | 2107 protected: |
| 2105 template<class> friend class AstNodeFactory; | 2108 template<class> friend class AstNodeFactory; |
| 2106 | 2109 |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2997 private: | 3000 private: |
| 2998 Isolate* isolate_; | 3001 Isolate* isolate_; |
| 2999 Zone* zone_; | 3002 Zone* zone_; |
| 3000 Visitor visitor_; | 3003 Visitor visitor_; |
| 3001 }; | 3004 }; |
| 3002 | 3005 |
| 3003 | 3006 |
| 3004 } } // namespace v8::internal | 3007 } } // namespace v8::internal |
| 3005 | 3008 |
| 3006 #endif // V8_AST_H_ | 3009 #endif // V8_AST_H_ |
| OLD | NEW |