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

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

Issue 929733003: for-of should throw if result object is not an object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add strings and move runtime function Created 5 years, 10 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 | « src/ast.h ('k') | src/parser.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 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 ZoneList<const AstRawString*>* strings_; 223 ZoneList<const AstRawString*>* strings_;
224 const char* symbol_name_; 224 const char* symbol_name_;
225 }; 225 };
226 226
227 // Internalized value (empty before internalized). 227 // Internalized value (empty before internalized).
228 Handle<Object> value_; 228 Handle<Object> value_;
229 }; 229 };
230 230
231 231
232 // For generating constants. 232 // For generating constants.
233 #define STRING_CONSTANTS(F) \ 233 #define STRING_CONSTANTS(F) \
234 F(anonymous_function, "(anonymous function)") \ 234 F(anonymous_function, "(anonymous function)") \
235 F(arguments, "arguments") \ 235 F(arguments, "arguments") \
236 F(constructor, "constructor") \ 236 F(constructor, "constructor") \
237 F(default, "default") \ 237 F(default, "default") \
238 F(done, "done") \ 238 F(done, "done") \
239 F(dot, ".") \ 239 F(dot, ".") \
240 F(dot_for, ".for") \ 240 F(dot_for, ".for") \
241 F(dot_generator, ".generator") \ 241 F(dot_generator, ".generator") \
242 F(dot_generator_object, ".generator_object") \ 242 F(dot_generator_object, ".generator_object") \
243 F(dot_iterator, ".iterator") \ 243 F(dot_iterator, ".iterator") \
244 F(dot_module, ".module") \ 244 F(dot_module, ".module") \
245 F(dot_result, ".result") \ 245 F(dot_result, ".result") \
246 F(empty, "") \ 246 F(empty, "") \
247 F(eval, "eval") \ 247 F(eval, "eval") \
248 F(get_template_callsite, "GetTemplateCallSite") \ 248 F(get_template_callsite, "GetTemplateCallSite") \
249 F(initialize_const_global, "initializeConstGlobal") \ 249 F(initialize_const_global, "initializeConstGlobal") \
250 F(initialize_var_global, "initializeVarGlobal") \ 250 F(initialize_var_global, "initializeVarGlobal") \
251 F(is_construct_call, "_IsConstructCall") \ 251 F(is_construct_call, "_IsConstructCall") \
252 F(let, "let") \ 252 F(is_spec_object, "_IsSpecObject") \
253 F(make_reference_error, "MakeReferenceErrorEmbedded") \ 253 F(let, "let") \
254 F(make_syntax_error, "MakeSyntaxErrorEmbedded") \ 254 F(make_reference_error, "MakeReferenceErrorEmbedded") \
255 F(make_type_error, "MakeTypeErrorEmbedded") \ 255 F(make_syntax_error, "MakeSyntaxErrorEmbedded") \
256 F(native, "native") \ 256 F(make_type_error, "MakeTypeErrorEmbedded") \
257 F(new_target, "new.target") \ 257 F(native, "native") \
258 F(next, "next") \ 258 F(new_target, "new.target") \
259 F(proto, "__proto__") \ 259 F(next, "next") \
260 F(prototype, "prototype") \ 260 F(proto, "__proto__") \
261 F(this, "this") \ 261 F(prototype, "prototype") \
262 F(use_asm, "use asm") \ 262 F(this, "this") \
263 F(use_strong, "use strong") \ 263 F(throw_iterator_result_not_an_object, "ThrowIteratorResultNotAnObject") \
264 F(use_strict, "use strict") \ 264 F(use_asm, "use asm") \
265 F(use_strong, "use strong") \
266 F(use_strict, "use strict") \
265 F(value, "value") 267 F(value, "value")
266 268
267 #define OTHER_CONSTANTS(F) \ 269 #define OTHER_CONSTANTS(F) \
268 F(true_value) \ 270 F(true_value) \
269 F(false_value) \ 271 F(false_value) \
270 F(null_value) \ 272 F(null_value) \
271 F(undefined_value) \ 273 F(undefined_value) \
272 F(the_hole_value) 274 F(the_hole_value)
273 275
274 class AstValueFactory { 276 class AstValueFactory {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 #define F(name) AstValue* name##_; 357 #define F(name) AstValue* name##_;
356 OTHER_CONSTANTS(F) 358 OTHER_CONSTANTS(F)
357 #undef F 359 #undef F
358 }; 360 };
359 } } // namespace v8::internal 361 } } // namespace v8::internal
360 362
361 #undef STRING_CONSTANTS 363 #undef STRING_CONSTANTS
362 #undef OTHER_CONSTANTS 364 #undef OTHER_CONSTANTS
363 365
364 #endif // V8_AST_VALUE_FACTORY_H_ 366 #endif // V8_AST_VALUE_FACTORY_H_
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698