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

Side by Side Diff: src/globals.h

Issue 2373983004: [turbofan] inline %StringIteratorPrototype%.next in JSBuiltinReducer. (Closed)
Patch Set: fix bug caused by InstallBuiltinFunctionIds() and some minor cleanup Created 4 years, 2 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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 // The top JS frame had been calling debug break slot stub. Patch the 1231 // The top JS frame had been calling debug break slot stub. Patch the
1232 // address this stub jumps to in the end. 1232 // address this stub jumps to in the end.
1233 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL, 1233 LIVE_EDIT_FRAME_DROPPED_IN_DEBUG_SLOT_CALL,
1234 // The top JS frame had been calling some C++ function. The return address 1234 // The top JS frame had been calling some C++ function. The return address
1235 // gets patched automatically. 1235 // gets patched automatically.
1236 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL, 1236 LIVE_EDIT_FRAME_DROPPED_IN_DIRECT_CALL,
1237 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL, 1237 LIVE_EDIT_FRAME_DROPPED_IN_RETURN_CALL,
1238 LIVE_EDIT_CURRENTLY_SET_MODE 1238 LIVE_EDIT_CURRENTLY_SET_MODE
1239 }; 1239 };
1240 1240
1241 enum class UnicodeEncoding : uint8_t {
1242 // Different unicode encodings in a |word32|:
1243 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate
1244 UTF32, // full UTF32 code unit / Unicode codepoint
1245 };
1246
1247 inline size_t hash_value(UnicodeEncoding encoding) {
1248 return static_cast<uint8_t>(encoding);
1249 }
1250
1251 inline std::ostream& operator<<(std::ostream& os, UnicodeEncoding encoding) {
1252 switch (encoding) {
1253 case UnicodeEncoding::UTF16:
1254 return os << "UTF16";
1255 case UnicodeEncoding::UTF32:
1256 return os << "UTF32";
1257 }
1258 UNREACHABLE();
1259 return os;
1260 }
1261
1241 } // namespace internal 1262 } // namespace internal
1242 } // namespace v8 1263 } // namespace v8
1243 1264
1244 namespace i = v8::internal; 1265 namespace i = v8::internal;
1245 1266
1246 #endif // V8_GLOBALS_H_ 1267 #endif // V8_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698