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

Side by Side Diff: src/factory.cc

Issue 1414013004: [turbofan] Add support for keyed access to named properties. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@JSNativeContextSpecialization_NotFound
Patch Set: Created 5 years, 1 month 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/factory.h ('k') | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 return InternalizeStringWithKey(&key); 237 return InternalizeStringWithKey(&key);
238 } 238 }
239 239
240 240
241 template<class StringTableKey> 241 template<class StringTableKey>
242 Handle<String> Factory::InternalizeStringWithKey(StringTableKey* key) { 242 Handle<String> Factory::InternalizeStringWithKey(StringTableKey* key) {
243 return StringTable::LookupKey(isolate(), key); 243 return StringTable::LookupKey(isolate(), key);
244 } 244 }
245 245
246 246
247 Handle<Name> Factory::InternalizeName(Handle<Name> name) {
248 if (name->IsUniqueName()) return name;
249 return InternalizeString(Handle<String>::cast(name));
250 }
251
252
247 MaybeHandle<String> Factory::NewStringFromOneByte(Vector<const uint8_t> string, 253 MaybeHandle<String> Factory::NewStringFromOneByte(Vector<const uint8_t> string,
248 PretenureFlag pretenure) { 254 PretenureFlag pretenure) {
249 int length = string.length(); 255 int length = string.length();
250 if (length == 1) return LookupSingleCharacterStringFromCode(string[0]); 256 if (length == 1) return LookupSingleCharacterStringFromCode(string[0]);
251 Handle<SeqOneByteString> result; 257 Handle<SeqOneByteString> result;
252 ASSIGN_RETURN_ON_EXCEPTION( 258 ASSIGN_RETURN_ON_EXCEPTION(
253 isolate(), 259 isolate(),
254 result, 260 result,
255 NewRawOneByteString(string.length(), pretenure), 261 NewRawOneByteString(string.length(), pretenure),
256 String); 262 String);
(...skipping 2127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 } 2390 }
2385 2391
2386 2392
2387 Handle<Object> Factory::ToBoolean(bool value) { 2393 Handle<Object> Factory::ToBoolean(bool value) {
2388 return value ? true_value() : false_value(); 2394 return value ? true_value() : false_value();
2389 } 2395 }
2390 2396
2391 2397
2392 } // namespace internal 2398 } // namespace internal
2393 } // namespace v8 2399 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698