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

Side by Side Diff: src/globals.h

Issue 2571563004: [Turbofan] Implement super calls with spread bytecode in assembly code. (Closed)
Patch Set: Update builtins for new push args modes Created 3 years, 11 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_GLOBALS_H_ 5 #ifndef V8_GLOBALS_H_
6 #define V8_GLOBALS_H_ 6 #define V8_GLOBALS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 switch (function_type) { 1206 switch (function_type) {
1207 case CallableType::kJSFunction: 1207 case CallableType::kJSFunction:
1208 return os << "JSFunction"; 1208 return os << "JSFunction";
1209 case CallableType::kAny: 1209 case CallableType::kAny:
1210 return os << "Any"; 1210 return os << "Any";
1211 } 1211 }
1212 UNREACHABLE(); 1212 UNREACHABLE();
1213 return os; 1213 return os;
1214 } 1214 }
1215 1215
1216 enum class PushArgsConstructMode : unsigned {
1217 kJSFunction,
1218 kWithFinalSpread,
1219 kOther
1220 };
1221
1222 inline size_t hash_value(PushArgsConstructMode mode) {
1223 return bit_cast<unsigned>(mode);
1224 }
1225
1226 inline std::ostream& operator<<(std::ostream& os, PushArgsConstructMode mode) {
1227 switch (mode) {
1228 case PushArgsConstructMode::kJSFunction:
1229 return os << "JSFunction";
1230 case PushArgsConstructMode::kWithFinalSpread:
1231 return os << "WithFinalSpread";
1232 case PushArgsConstructMode::kOther:
1233 return os << "Other";
1234 }
1235 UNREACHABLE();
1236 return os;
1237 }
1238
1216 inline uint32_t ObjectHash(Address address) { 1239 inline uint32_t ObjectHash(Address address) {
1217 // All objects are at least pointer aligned, so we can remove the trailing 1240 // All objects are at least pointer aligned, so we can remove the trailing
1218 // zeros. 1241 // zeros.
1219 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> 1242 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >>
1220 kPointerSizeLog2); 1243 kPointerSizeLog2);
1221 } 1244 }
1222 1245
1223 // Type feedback is encoded in such a way that, we can combine the feedback 1246 // Type feedback is encoded in such a way that, we can combine the feedback
1224 // at different points by performing an 'OR' operation. Type feedback moves 1247 // at different points by performing an 'OR' operation. Type feedback moves
1225 // to a more generic type when we combine feedback. 1248 // to a more generic type when we combine feedback.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 } // namespace internal 1348 } // namespace internal
1326 } // namespace v8 1349 } // namespace v8
1327 1350
1328 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is 1351 // Used by js-builtin-reducer to identify whether ReduceArrayIterator() is
1329 // reducing a JSArray method, or a JSTypedArray method. 1352 // reducing a JSArray method, or a JSTypedArray method.
1330 enum class ArrayIteratorKind { kArray, kTypedArray }; 1353 enum class ArrayIteratorKind { kArray, kTypedArray };
1331 1354
1332 namespace i = v8::internal; 1355 namespace i = v8::internal;
1333 1356
1334 #endif // V8_GLOBALS_H_ 1357 #endif // V8_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698