@@ -8616,24 +8616,10 @@ class UnboxIntegerInstr : public UnboxInstr {
86168616 enum TruncationMode { kTruncate , kNoTruncation };
86178617
86188618 UnboxIntegerInstr (Representation representation,
8619- TruncationMode truncation_mode,
86208619 Value* value,
86218620 intptr_t deopt_id,
86228621 ValueMode value_mode)
8623- : UnboxInstr(representation, value, deopt_id, value_mode),
8624- is_truncating_ (truncation_mode == kTruncate ) {}
8625-
8626- bool is_truncating () const { return is_truncating_; }
8627-
8628- void mark_truncating () { is_truncating_ = true ; }
8629-
8630- virtual bool ComputeCanDeoptimize () const ;
8631-
8632- virtual bool AttributesEqual (const Instruction& other) const {
8633- auto const other_unbox = other.AsUnboxInteger ();
8634- return UnboxInstr::AttributesEqual (other) &&
8635- (other_unbox->is_truncating_ == is_truncating_);
8636- }
8622+ : UnboxInstr(representation, value, deopt_id, value_mode) {}
86378623
86388624 virtual Definition* Canonicalize (FlowGraph* flow_graph);
86398625
@@ -8643,12 +8629,7 @@ class UnboxIntegerInstr : public UnboxInstr {
86438629
86448630 PRINT_OPERANDS_TO_SUPPORT
86458631
8646- #define FIELD_LIST (F ) F(bool , is_truncating_)
8647-
8648- DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS (UnboxIntegerInstr,
8649- UnboxInstr,
8650- FIELD_LIST)
8651- #undef FIELD_LIST
8632+ DECLARE_EMPTY_SERIALIZATION (UnboxIntegerInstr, UnboxInstr)
86528633
86538634 private:
86548635 DISALLOW_COPY_AND_ASSIGN (UnboxIntegerInstr);
@@ -8657,15 +8638,10 @@ class UnboxIntegerInstr : public UnboxInstr {
86578638class UnboxInteger32Instr : public UnboxIntegerInstr {
86588639 public:
86598640 UnboxInteger32Instr (Representation representation,
8660- TruncationMode truncation_mode,
86618641 Value* value,
86628642 intptr_t deopt_id,
86638643 ValueMode value_mode)
8664- : UnboxIntegerInstr(representation,
8665- truncation_mode,
8666- value,
8667- deopt_id,
8668- value_mode) {}
8644+ : UnboxIntegerInstr(representation, value, deopt_id, value_mode) {}
86698645
86708646 DECLARE_INSTRUCTION_BACKEND ()
86718647
@@ -8678,13 +8654,7 @@ class UnboxInteger32Instr : public UnboxIntegerInstr {
86788654class UnboxUint32Instr : public UnboxInteger32Instr {
86798655 public:
86808656 UnboxUint32Instr (Value* value, intptr_t deopt_id, ValueMode value_mode)
8681- : UnboxInteger32Instr(kUnboxedUint32 ,
8682- kTruncate ,
8683- value,
8684- deopt_id,
8685- value_mode) {
8686- ASSERT (is_truncating ());
8687- }
8657+ : UnboxInteger32Instr(kUnboxedUint32 , value, deopt_id, value_mode) {}
86888658
86898659 DECLARE_INSTRUCTION_NO_BACKEND (UnboxUint32)
86908660
@@ -8696,15 +8666,8 @@ class UnboxUint32Instr : public UnboxInteger32Instr {
86968666
86978667class UnboxInt32Instr : public UnboxInteger32Instr {
86988668 public:
8699- UnboxInt32Instr (TruncationMode truncation_mode,
8700- Value* value,
8701- intptr_t deopt_id,
8702- ValueMode value_mode)
8703- : UnboxInteger32Instr(kUnboxedInt32 ,
8704- truncation_mode,
8705- value,
8706- deopt_id,
8707- value_mode) {}
8669+ UnboxInt32Instr (Value* value, intptr_t deopt_id, ValueMode value_mode)
8670+ : UnboxInteger32Instr(kUnboxedInt32 , value, deopt_id, value_mode) {}
87088671
87098672 DECLARE_INSTRUCTION_NO_BACKEND (UnboxInt32)
87108673
@@ -8717,11 +8680,7 @@ class UnboxInt32Instr : public UnboxInteger32Instr {
87178680class UnboxInt64Instr : public UnboxIntegerInstr {
87188681 public:
87198682 UnboxInt64Instr (Value* value, intptr_t deopt_id, ValueMode value_mode)
8720- : UnboxIntegerInstr(kUnboxedInt64 ,
8721- kNoTruncation ,
8722- value,
8723- deopt_id,
8724- value_mode) {}
8683+ : UnboxIntegerInstr(kUnboxedInt64 , value, deopt_id, value_mode) {}
87258684
87268685 DECLARE_INSTRUCTION_NO_BACKEND (UnboxInt64)
87278686
@@ -10788,14 +10747,10 @@ class CheckConditionInstr : public Instruction {
1078810747
1078910748class IntConverterInstr : public TemplateDefinition <1 , NoThrow, Pure> {
1079010749 public:
10791- IntConverterInstr (Representation from,
10792- Representation to,
10793- Value* value,
10794- intptr_t deopt_id)
10795- : TemplateDefinition(deopt_id),
10750+ IntConverterInstr (Representation from, Representation to, Value* value)
10751+ : TemplateDefinition(DeoptId::kNone ),
1079610752 from_representation_ (from),
10797- to_representation_(to),
10798- is_truncating_(to == kUnboxedUint32 ) {
10753+ to_representation_(to) {
1079910754 ASSERT (from != to);
1080010755 // Integer conversion doesn't currently handle non-native representations.
1080110756 ASSERT_EQUAL (Boxing::NativeRepresentation (from), from);
@@ -10816,13 +10771,10 @@ class IntConverterInstr : public TemplateDefinition<1, NoThrow, Pure> {
1081610771
1081710772 Representation from () const { return from_representation_; }
1081810773 Representation to () const { return to_representation_; }
10819- bool is_truncating () const { return is_truncating_; }
10820-
10821- void mark_truncating () { is_truncating_ = true ; }
1082210774
1082310775 Definition* Canonicalize (FlowGraph* flow_graph);
1082410776
10825- virtual bool ComputeCanDeoptimize () const ;
10777+ virtual bool ComputeCanDeoptimize () const { return false ; }
1082610778
1082710779 virtual Representation representation () const { return to (); }
1082810780
@@ -10834,8 +10786,7 @@ class IntConverterInstr : public TemplateDefinition<1, NoThrow, Pure> {
1083410786 virtual bool AttributesEqual (const Instruction& other) const {
1083510787 ASSERT (other.IsIntConverter ());
1083610788 auto const converter = other.AsIntConverter ();
10837- return (converter->from () == from ()) && (converter->to () == to ()) &&
10838- (converter->is_truncating () == is_truncating ());
10789+ return (converter->from () == from ()) && (converter->to () == to ());
1083910790 }
1084010791
1084110792 virtual intptr_t DeoptimizationTarget () const { return GetDeoptId (); }
@@ -10850,15 +10801,13 @@ class IntConverterInstr : public TemplateDefinition<1, NoThrow, Pure> {
1085010801
1085110802 DECLARE_INSTRUCTION (IntConverter);
1085210803
10853- DECLARE_ATTRIBUTES_NAMED ((" from" , " to" , " is_truncating" ),
10854- (from(), to(), is_truncating()))
10804+ DECLARE_ATTRIBUTES_NAMED ((" from" , " to" ), (from(), to()))
1085510805
1085610806 PRINT_OPERANDS_TO_SUPPORT
1085710807
1085810808#define FIELD_LIST (F ) \
1085910809 F (const Representation, from_representation_) \
10860- F(const Representation, to_representation_) \
10861- F(bool , is_truncating_)
10810+ F(const Representation, to_representation_)
1086210811
1086310812 DECLARE_INSTRUCTION_SERIALIZABLE_FIELDS(IntConverterInstr,
1086410813 TemplateDefinition,
0 commit comments