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

Side by Side Diff: src/type-hints.h

Issue 2498563002: [cleanup] Replace ToBooleanICStub::Types with ToBooleanHints (Closed)
Patch Set: Created 4 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/crankshaft/x87/lithium-x87.cc ('k') | src/type-hints.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_TYPE_HINTS_H_ 5 #ifndef V8_TYPE_HINTS_H_
6 #define V8_TYPE_HINTS_H_ 6 #define V8_TYPE_HINTS_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/utils.h" 9 #include "src/utils.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 kUndefined = 1u << 0, 48 kUndefined = 1u << 0,
49 kBoolean = 1u << 1, 49 kBoolean = 1u << 1,
50 kNull = 1u << 2, 50 kNull = 1u << 2,
51 kSmallInteger = 1u << 3, 51 kSmallInteger = 1u << 3,
52 kReceiver = 1u << 4, 52 kReceiver = 1u << 4,
53 kString = 1u << 5, 53 kString = 1u << 5,
54 kSymbol = 1u << 6, 54 kSymbol = 1u << 6,
55 kHeapNumber = 1u << 7, 55 kHeapNumber = 1u << 7,
56 kSimdValue = 1u << 8, 56 kSimdValue = 1u << 8,
57 kAny = kUndefined | kBoolean | kNull | kSmallInteger | kReceiver | kString | 57 kAny = kUndefined | kBoolean | kNull | kSmallInteger | kReceiver | kString |
58 kSymbol | kHeapNumber | kSimdValue 58 kSymbol | kHeapNumber | kSimdValue,
59 kNeedsMap = kReceiver | kString | kSymbol | kHeapNumber | kSimdValue,
60 kCanBeUndetectable = kReceiver,
59 }; 61 };
60 62
61 std::ostream& operator<<(std::ostream&, ToBooleanHint); 63 std::ostream& operator<<(std::ostream&, ToBooleanHint);
62 64
63 typedef base::Flags<ToBooleanHint, uint16_t> ToBooleanHints; 65 typedef base::Flags<ToBooleanHint, uint16_t> ToBooleanHints;
64 66
65 std::ostream& operator<<(std::ostream&, ToBooleanHints); 67 std::ostream& operator<<(std::ostream&, ToBooleanHints);
66 68
67 DEFINE_OPERATORS_FOR_FLAGS(ToBooleanHints) 69 DEFINE_OPERATORS_FOR_FLAGS(ToBooleanHints)
68 70
71 enum StringAddFlags {
72 // Omit both parameter checks.
73 STRING_ADD_CHECK_NONE = 0,
74 // Check left parameter.
75 STRING_ADD_CHECK_LEFT = 1 << 0,
76 // Check right parameter.
77 STRING_ADD_CHECK_RIGHT = 1 << 1,
78 // Check both parameters.
79 STRING_ADD_CHECK_BOTH = STRING_ADD_CHECK_LEFT | STRING_ADD_CHECK_RIGHT,
80 // Convert parameters when check fails (instead of throwing an exception).
81 STRING_ADD_CONVERT = 1 << 2,
82 STRING_ADD_CONVERT_LEFT = STRING_ADD_CHECK_LEFT | STRING_ADD_CONVERT,
83 STRING_ADD_CONVERT_RIGHT = STRING_ADD_CHECK_RIGHT | STRING_ADD_CONVERT
84 };
85
86 std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags);
87
69 } // namespace internal 88 } // namespace internal
70 } // namespace v8 89 } // namespace v8
71 90
72 #endif // V8_TYPE_HINTS_H_ 91 #endif // V8_TYPE_HINTS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-x87.cc ('k') | src/type-hints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698