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

Unified Diff: src/code-stubs.h

Issue 1491223002: [turbofan] Desugar JSUnaryNot(x) to Select(x, false, true). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in arm64. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 5028fef6aab3353e47be009eddeb7a99cd6fde8a..6e79f07ee769cd93d62088d24e7001ce142e6c22 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -2747,12 +2747,6 @@ class ToBooleanStub: public HydrogenCodeStub {
NUMBER_OF_TYPES
};
- enum ResultMode {
- RESULT_AS_SMI, // For Smi(1) on truthy value, Smi(0) otherwise.
- RESULT_AS_ODDBALL, // For {true} on truthy value, {false} otherwise.
- RESULT_AS_INVERSE_ODDBALL // For {false} on truthy value, {true} otherwise.
- };
-
// At most 16 different types can be distinguished, because the Code object
// only has room for two bytes to hold a set of these types. :-P
STATIC_ASSERT(NUMBER_OF_TYPES <= 16);
@@ -2772,21 +2766,13 @@ class ToBooleanStub: public HydrogenCodeStub {
static Types Generic() { return Types((1 << NUMBER_OF_TYPES) - 1); }
};
- ToBooleanStub(Isolate* isolate, ResultMode mode, Types types = Types())
- : HydrogenCodeStub(isolate) {
- set_sub_minor_key(TypesBits::encode(types.ToIntegral()) |
- ResultModeBits::encode(mode));
- }
-
ToBooleanStub(Isolate* isolate, ExtraICState state)
: HydrogenCodeStub(isolate) {
- set_sub_minor_key(TypesBits::encode(static_cast<uint16_t>(state)) |
- ResultModeBits::encode(RESULT_AS_SMI));
+ set_sub_minor_key(TypesBits::encode(static_cast<uint16_t>(state)));
}
bool UpdateStatus(Handle<Object> object);
Types types() const { return Types(TypesBits::decode(sub_minor_key())); }
- ResultMode mode() const { return ResultModeBits::decode(sub_minor_key()); }
Code::Kind GetCodeKind() const override { return Code::TO_BOOLEAN_IC; }
void PrintState(std::ostream& os) const override; // NOLINT
@@ -2810,11 +2796,9 @@ class ToBooleanStub: public HydrogenCodeStub {
private:
ToBooleanStub(Isolate* isolate, InitializationState init_state)
: HydrogenCodeStub(isolate, init_state) {
- set_sub_minor_key(ResultModeBits::encode(RESULT_AS_SMI));
}
class TypesBits : public BitField<uint16_t, 0, NUMBER_OF_TYPES> {};
- class ResultModeBits : public BitField<ResultMode, NUMBER_OF_TYPES, 2> {};
DEFINE_CALL_INTERFACE_DESCRIPTOR(ToBoolean);
DEFINE_HYDROGEN_CODE_STUB(ToBoolean, HydrogenCodeStub);
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698