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

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

Issue 932333004: [strong] Deprecate arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments 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 | « no previous file | src/messages.js » ('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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool is_one_byte() const { return is_one_byte_; } 81 bool is_one_byte() const { return is_one_byte_; }
82 bool IsOneByteEqualTo(const char* data) const; 82 bool IsOneByteEqualTo(const char* data) const;
83 uint16_t FirstCharacter() const { 83 uint16_t FirstCharacter() const {
84 if (is_one_byte_) 84 if (is_one_byte_)
85 return literal_bytes_[0]; 85 return literal_bytes_[0];
86 const uint16_t* c = 86 const uint16_t* c =
87 reinterpret_cast<const uint16_t*>(literal_bytes_.start()); 87 reinterpret_cast<const uint16_t*>(literal_bytes_.start());
88 return *c; 88 return *c;
89 } 89 }
90 90
91 V8_INLINE bool IsArguments(AstValueFactory* ast_value_factory) const;
92
93 // For storing AstRawStrings in a hash map. 91 // For storing AstRawStrings in a hash map.
94 uint32_t hash() const { 92 uint32_t hash() const {
95 return hash_; 93 return hash_;
96 } 94 }
97 static bool Compare(void* a, void* b); 95 static bool Compare(void* a, void* b);
98 96
99 bool operator==(const AstRawString& rhs) const; 97 bool operator==(const AstRawString& rhs) const;
100 98
101 private: 99 private:
102 friend class AstValueFactory; 100 friend class AstValueFactory;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 uint32_t hash_seed_; 348 uint32_t hash_seed_;
351 349
352 #define F(name, str) const AstRawString* name##_string_; 350 #define F(name, str) const AstRawString* name##_string_;
353 STRING_CONSTANTS(F) 351 STRING_CONSTANTS(F)
354 #undef F 352 #undef F
355 353
356 #define F(name) AstValue* name##_; 354 #define F(name) AstValue* name##_;
357 OTHER_CONSTANTS(F) 355 OTHER_CONSTANTS(F)
358 #undef F 356 #undef F
359 }; 357 };
360
361
362 bool AstRawString::IsArguments(AstValueFactory* ast_value_factory) const {
363 return ast_value_factory->arguments_string() == this;
364 }
365 } } // namespace v8::internal 358 } } // namespace v8::internal
366 359
367 #undef STRING_CONSTANTS 360 #undef STRING_CONSTANTS
368 #undef OTHER_CONSTANTS 361 #undef OTHER_CONSTANTS
369 362
370 #endif // V8_AST_VALUE_FACTORY_H_ 363 #endif // V8_AST_VALUE_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698