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

Side by Side Diff: src/ast-value-factory.h

Issue 1139603005: [destructuring] Implement BindingArrayPattern (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased + feedback Created 5 years, 7 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/parser.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 // 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 bool EqualsString(const AstRawString* string) const { 164 bool EqualsString(const AstRawString* string) const {
165 return type_ == STRING && string_ == string; 165 return type_ == STRING && string_ == string;
166 } 166 }
167 167
168 bool IsPropertyName() const; 168 bool IsPropertyName() const;
169 169
170 bool BooleanValue() const; 170 bool BooleanValue() const;
171 171
172 bool IsTheHole() const { return type_ == THE_HOLE; }
173
172 void Internalize(Isolate* isolate); 174 void Internalize(Isolate* isolate);
173 175
174 // Can be called after Internalize has been called. 176 // Can be called after Internalize has been called.
175 V8_INLINE Handle<Object> value() const { 177 V8_INLINE Handle<Object> value() const {
176 if (type_ == STRING) { 178 if (type_ == STRING) {
177 return string_->string(); 179 return string_->string();
178 } 180 }
179 DCHECK(!value_.is_null()); 181 DCHECK(!value_.is_null());
180 return value_; 182 return value_;
181 } 183 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 #define F(name) AstValue* name##_; 366 #define F(name) AstValue* name##_;
365 OTHER_CONSTANTS(F) 367 OTHER_CONSTANTS(F)
366 #undef F 368 #undef F
367 }; 369 };
368 } } // namespace v8::internal 370 } } // namespace v8::internal
369 371
370 #undef STRING_CONSTANTS 372 #undef STRING_CONSTANTS
371 #undef OTHER_CONSTANTS 373 #undef OTHER_CONSTANTS
372 374
373 #endif // V8_AST_VALUE_FACTORY_H_ 375 #endif // V8_AST_VALUE_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698