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

Side by Side Diff: src/objects.h

Issue 2587373002: Revert of [runtime] Add fast-paths for common conversion methods (Closed)
Patch Set: Created 4 years 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/objects.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 Isolate* isolate, Handle<Object> input); 1306 Isolate* isolate, Handle<Object> input);
1307 1307
1308 // ES6 section 7.1.12 ToString 1308 // ES6 section 7.1.12 ToString
1309 MUST_USE_RESULT static inline MaybeHandle<String> ToString( 1309 MUST_USE_RESULT static inline MaybeHandle<String> ToString(
1310 Isolate* isolate, Handle<Object> input); 1310 Isolate* isolate, Handle<Object> input);
1311 1311
1312 static Handle<String> NoSideEffectsToString(Isolate* isolate, 1312 static Handle<String> NoSideEffectsToString(Isolate* isolate,
1313 Handle<Object> input); 1313 Handle<Object> input);
1314 1314
1315 // ES6 section 7.1.14 ToPropertyKey 1315 // ES6 section 7.1.14 ToPropertyKey
1316 MUST_USE_RESULT static inline MaybeHandle<Object> ToPropertyKey( 1316 MUST_USE_RESULT static MaybeHandle<Object> ToPropertyKey(
1317 Isolate* isolate, Handle<Object> value); 1317 Isolate* isolate, Handle<Object> value);
1318 1318
1319 // ES6 section 7.1.15 ToLength 1319 // ES6 section 7.1.15 ToLength
1320 MUST_USE_RESULT static inline MaybeHandle<Object> ToLength( 1320 MUST_USE_RESULT static MaybeHandle<Object> ToLength(Isolate* isolate,
1321 Isolate* isolate, Handle<Object> input); 1321 Handle<Object> input);
1322 1322
1323 // ES6 section 7.1.17 ToIndex 1323 // ES6 section 7.1.17 ToIndex
1324 MUST_USE_RESULT static inline MaybeHandle<Object> ToIndex( 1324 MUST_USE_RESULT static MaybeHandle<Object> ToIndex(
1325 Isolate* isolate, Handle<Object> input, 1325 Isolate* isolate, Handle<Object> input,
1326 MessageTemplate::Template error_index); 1326 MessageTemplate::Template error_index);
1327 1327
1328 // ES6 section 7.3.9 GetMethod 1328 // ES6 section 7.3.9 GetMethod
1329 MUST_USE_RESULT static MaybeHandle<Object> GetMethod( 1329 MUST_USE_RESULT static MaybeHandle<Object> GetMethod(
1330 Handle<JSReceiver> receiver, Handle<Name> name); 1330 Handle<JSReceiver> receiver, Handle<Name> name);
1331 1331
1332 // ES6 section 7.3.17 CreateListFromArrayLike 1332 // ES6 section 7.3.17 CreateListFromArrayLike
1333 MUST_USE_RESULT static MaybeHandle<FixedArray> CreateListFromArrayLike( 1333 MUST_USE_RESULT static MaybeHandle<FixedArray> CreateListFromArrayLike(
1334 Isolate* isolate, Handle<Object> object, ElementTypes element_types); 1334 Isolate* isolate, Handle<Object> object, ElementTypes element_types);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 Map* GetPrototypeChainRootMap(Isolate* isolate); 1549 Map* GetPrototypeChainRootMap(Isolate* isolate);
1550 1550
1551 // Helper for SetProperty and SetSuperProperty. 1551 // Helper for SetProperty and SetSuperProperty.
1552 // Return value is only meaningful if [found] is set to true on return. 1552 // Return value is only meaningful if [found] is set to true on return.
1553 MUST_USE_RESULT static Maybe<bool> SetPropertyInternal( 1553 MUST_USE_RESULT static Maybe<bool> SetPropertyInternal(
1554 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, 1554 LookupIterator* it, Handle<Object> value, LanguageMode language_mode,
1555 StoreFromKeyed store_mode, bool* found); 1555 StoreFromKeyed store_mode, bool* found);
1556 1556
1557 MUST_USE_RESULT static MaybeHandle<Name> ConvertToName(Isolate* isolate, 1557 MUST_USE_RESULT static MaybeHandle<Name> ConvertToName(Isolate* isolate,
1558 Handle<Object> input); 1558 Handle<Object> input);
1559 MUST_USE_RESULT static MaybeHandle<Object> ConvertToPropertyKey(
1560 Isolate* isolate, Handle<Object> value);
1561 MUST_USE_RESULT static MaybeHandle<String> ConvertToString( 1559 MUST_USE_RESULT static MaybeHandle<String> ConvertToString(
1562 Isolate* isolate, Handle<Object> input); 1560 Isolate* isolate, Handle<Object> input);
1563 MUST_USE_RESULT static MaybeHandle<Object> ConvertToNumber( 1561 MUST_USE_RESULT static MaybeHandle<Object> ConvertToNumber(
1564 Isolate* isolate, Handle<Object> input); 1562 Isolate* isolate, Handle<Object> input);
1565 MUST_USE_RESULT static MaybeHandle<Object> ConvertToInteger( 1563 MUST_USE_RESULT static MaybeHandle<Object> ConvertToInteger(
1566 Isolate* isolate, Handle<Object> input); 1564 Isolate* isolate, Handle<Object> input);
1567 MUST_USE_RESULT static MaybeHandle<Object> ConvertToInt32( 1565 MUST_USE_RESULT static MaybeHandle<Object> ConvertToInt32(
1568 Isolate* isolate, Handle<Object> input); 1566 Isolate* isolate, Handle<Object> input);
1569 MUST_USE_RESULT static MaybeHandle<Object> ConvertToUint32( 1567 MUST_USE_RESULT static MaybeHandle<Object> ConvertToUint32(
1570 Isolate* isolate, Handle<Object> input); 1568 Isolate* isolate, Handle<Object> input);
1571 MUST_USE_RESULT static MaybeHandle<Object> ConvertToLength(
1572 Isolate* isolate, Handle<Object> input);
1573 MUST_USE_RESULT static MaybeHandle<Object> ConvertToIndex(
1574 Isolate* isolate, Handle<Object> input,
1575 MessageTemplate::Template error_index);
1576
1577 DISALLOW_IMPLICIT_CONSTRUCTORS(Object); 1569 DISALLOW_IMPLICIT_CONSTRUCTORS(Object);
1578 }; 1570 };
1579 1571
1580 1572
1581 // In objects.h to be usable without objects-inl.h inclusion. 1573 // In objects.h to be usable without objects-inl.h inclusion.
1582 bool Object::IsSmi() const { return HAS_SMI_TAG(this); } 1574 bool Object::IsSmi() const { return HAS_SMI_TAG(this); }
1583 bool Object::IsHeapObject() const { return Internals::HasHeapObjectTag(this); } 1575 bool Object::IsHeapObject() const { return Internals::HasHeapObjectTag(this); }
1584 1576
1585 1577
1586 struct Brief { 1578 struct Brief {
(...skipping 10443 matching lines...) Expand 10 before | Expand all | Expand 10 after
12030 } 12022 }
12031 return value; 12023 return value;
12032 } 12024 }
12033 }; 12025 };
12034 12026
12035 12027
12036 } // NOLINT, false-positive due to second-order macros. 12028 } // NOLINT, false-positive due to second-order macros.
12037 } // NOLINT, false-positive due to second-order macros. 12029 } // NOLINT, false-positive due to second-order macros.
12038 12030
12039 #endif // V8_OBJECTS_H_ 12031 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698