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

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

Issue 422923004: Track usage of "this" and "arguments" in Scope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/preparser.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 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 bool IsArguments() const { return IsOneByteEqualTo("arguments"); }
marja 2014/08/11 08:51:39 This doesn't look correct. The AstStrings are uniq
92
91 // For storing AstRawStrings in a hash map. 93 // For storing AstRawStrings in a hash map.
92 uint32_t hash() const { 94 uint32_t hash() const {
93 return hash_; 95 return hash_;
94 } 96 }
95 static bool Compare(void* a, void* b); 97 static bool Compare(void* a, void* b);
96 98
97 private: 99 private:
98 friend class AstValueFactory; 100 friend class AstValueFactory;
99 friend class AstRawStringInternalizationKey; 101 friend class AstRawStringInternalizationKey;
100 102
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 const AstRawString* name##_string_; 337 const AstRawString* name##_string_;
336 STRING_CONSTANTS(F) 338 STRING_CONSTANTS(F)
337 #undef F 339 #undef F
338 }; 340 };
339 341
340 } } // namespace v8::internal 342 } } // namespace v8::internal
341 343
342 #undef STRING_CONSTANTS 344 #undef STRING_CONSTANTS
343 345
344 #endif // V8_AST_VALUE_FACTORY_H_ 346 #endif // V8_AST_VALUE_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698