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

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

Issue 1053773006: [es6] implement default/optional parameters (WIP / comments) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void Internalize(Isolate* isolate); 172 void Internalize(Isolate* isolate);
173 173
174 bool IsUndefined() const {
175 return type_ == UNDEFINED;
176 }
177
174 // Can be called after Internalize has been called. 178 // Can be called after Internalize has been called.
175 V8_INLINE Handle<Object> value() const { 179 V8_INLINE Handle<Object> value() const {
176 if (type_ == STRING) { 180 if (type_ == STRING) {
177 return string_->string(); 181 return string_->string();
178 } 182 }
179 DCHECK(!value_.is_null()); 183 DCHECK(!value_.is_null());
180 return value_; 184 return value_;
181 } 185 }
182 186
183 private: 187 private:
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 #define F(name) AstValue* name##_; 367 #define F(name) AstValue* name##_;
364 OTHER_CONSTANTS(F) 368 OTHER_CONSTANTS(F)
365 #undef F 369 #undef F
366 }; 370 };
367 } } // namespace v8::internal 371 } } // namespace v8::internal
368 372
369 #undef STRING_CONSTANTS 373 #undef STRING_CONSTANTS
370 #undef OTHER_CONSTANTS 374 #undef OTHER_CONSTANTS
371 375
372 #endif // V8_AST_VALUE_FACTORY_H_ 376 #endif // V8_AST_VALUE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698