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

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

Issue 1692713005: ES6: Desugaring of instanceof to support @@hasInstance (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@blah
Patch Set: REBASE plus comment response. Created 4 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/bootstrapper.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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 switch (type_) { 165 switch (type_) {
166 case STRING: 166 case STRING:
167 DCHECK(string_ != NULL); 167 DCHECK(string_ != NULL);
168 // Strings are already internalized. 168 // Strings are already internalized.
169 DCHECK(!string_->string().is_null()); 169 DCHECK(!string_->string().is_null());
170 break; 170 break;
171 case SYMBOL: 171 case SYMBOL:
172 if (symbol_name_[0] == 'i') { 172 if (symbol_name_[0] == 'i') {
173 DCHECK_EQ(0, strcmp(symbol_name_, "iterator_symbol")); 173 DCHECK_EQ(0, strcmp(symbol_name_, "iterator_symbol"));
174 value_ = isolate->factory()->iterator_symbol(); 174 value_ = isolate->factory()->iterator_symbol();
175 } else if (strcmp(symbol_name_, "hasInstance_symbol") == 0) {
176 value_ = isolate->factory()->has_instance_symbol();
175 } else { 177 } else {
176 DCHECK_EQ(0, strcmp(symbol_name_, "home_object_symbol")); 178 DCHECK_EQ(0, strcmp(symbol_name_, "home_object_symbol"));
177 value_ = isolate->factory()->home_object_symbol(); 179 value_ = isolate->factory()->home_object_symbol();
178 } 180 }
179 break; 181 break;
180 case NUMBER_WITH_DOT: 182 case NUMBER_WITH_DOT:
181 case NUMBER: 183 case NUMBER:
182 value_ = isolate->factory()->NewNumber(number_, TENURED); 184 value_ = isolate->factory()->NewNumber(number_, TENURED);
183 break; 185 break;
184 case SMI: 186 case SMI:
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 length) == 0; 404 length) == 0;
403 } else { 405 } else {
404 return CompareCharsUnsigned(reinterpret_cast<const uint16_t*>(l), 406 return CompareCharsUnsigned(reinterpret_cast<const uint16_t*>(l),
405 reinterpret_cast<const uint16_t*>(r), 407 reinterpret_cast<const uint16_t*>(r),
406 length) == 0; 408 length) == 0;
407 } 409 }
408 } 410 }
409 } 411 }
410 } // namespace internal 412 } // namespace internal
411 } // namespace v8 413 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698