| Index: runtime/vm/intermediate_language.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.cc (revision 31159)
|
| +++ runtime/vm/intermediate_language.cc (working copy)
|
| @@ -26,6 +26,7 @@
|
|
|
| DEFINE_FLAG(bool, propagate_ic_data, true,
|
| "Propagate IC data from unoptimized to optimized IC calls.");
|
| +DEFINE_FLAG(bool, unbox_double_fields, true, "Support unboxed double fields.");
|
| DECLARE_FLAG(bool, enable_type_checks);
|
| DECLARE_FLAG(bool, eliminate_type_checks);
|
| DECLARE_FLAG(bool, trace_optimization);
|
| @@ -136,6 +137,30 @@
|
| }
|
|
|
|
|
| +bool LoadFieldInstr::IsUnboxedLoad() const {
|
| + return FLAG_unbox_double_fields
|
| + && (field() != NULL)
|
| + && field()->IsUnboxedField();
|
| +}
|
| +
|
| +
|
| +bool LoadFieldInstr::IsPotentialUnboxedLoad() const {
|
| + return FLAG_unbox_double_fields
|
| + && (field() != NULL)
|
| + && field()->IsPotentialUnboxedField();
|
| +}
|
| +
|
| +
|
| +bool StoreInstanceFieldInstr::IsUnboxedStore() const {
|
| + return FLAG_unbox_double_fields && field().IsUnboxedField();
|
| +}
|
| +
|
| +
|
| +bool StoreInstanceFieldInstr::IsPotentialUnboxedStore() const {
|
| + return FLAG_unbox_double_fields && field().IsPotentialUnboxedField();
|
| +}
|
| +
|
| +
|
| bool GuardFieldInstr::AttributesEqual(Instruction* other) const {
|
| return field().raw() == other->AsGuardField()->field().raw();
|
| }
|
| @@ -1757,13 +1782,13 @@
|
|
|
| #define __ compiler->assembler()->
|
|
|
| -LocationSummary* GraphEntryInstr::MakeLocationSummary() const {
|
| +LocationSummary* GraphEntryInstr::MakeLocationSummary(bool optimizing) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
|
|
|
|
| -LocationSummary* JoinEntryInstr::MakeLocationSummary() const {
|
| +LocationSummary* JoinEntryInstr::MakeLocationSummary(bool optimizing) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
| @@ -1782,7 +1807,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* TargetEntryInstr::MakeLocationSummary() const {
|
| +LocationSummary* TargetEntryInstr::MakeLocationSummary(bool optimizing) const {
|
| // FlowGraphCompiler::EmitInstructionPrologue is not called for block
|
| // entry instructions, so this function is unused. If it becomes
|
| // reachable, note that the deoptimization descriptor in unoptimized code
|
| @@ -1794,7 +1819,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* PhiInstr::MakeLocationSummary() const {
|
| +LocationSummary* PhiInstr::MakeLocationSummary(bool optimizing) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
| @@ -1805,7 +1830,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* RedefinitionInstr::MakeLocationSummary() const {
|
| +LocationSummary* RedefinitionInstr::MakeLocationSummary(bool optimizing) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
| @@ -1816,7 +1841,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* ParameterInstr::MakeLocationSummary() const {
|
| +LocationSummary* ParameterInstr::MakeLocationSummary(bool optimizing) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
| @@ -1827,7 +1852,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* ParallelMoveInstr::MakeLocationSummary() const {
|
| +LocationSummary* ParallelMoveInstr::MakeLocationSummary(bool optimizing) const {
|
| return NULL;
|
| }
|
|
|
| @@ -1837,7 +1862,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* ConstraintInstr::MakeLocationSummary() const {
|
| +LocationSummary* ConstraintInstr::MakeLocationSummary(bool optimizing) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
| @@ -1848,7 +1873,8 @@
|
| }
|
|
|
|
|
| -LocationSummary* MaterializeObjectInstr::MakeLocationSummary() const {
|
| +LocationSummary* MaterializeObjectInstr::MakeLocationSummary(
|
| + bool optimizing) const {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
| @@ -1859,7 +1885,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* StoreContextInstr::MakeLocationSummary() const {
|
| +LocationSummary* StoreContextInstr::MakeLocationSummary(bool optimizing) const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -1869,7 +1895,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* PushTempInstr::MakeLocationSummary() const {
|
| +LocationSummary* PushTempInstr::MakeLocationSummary(bool optimizing) const {
|
| return LocationSummary::Make(1,
|
| Location::NoLocation(),
|
| LocationSummary::kNoCall);
|
| @@ -1882,7 +1908,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* DropTempsInstr::MakeLocationSummary() const {
|
| +LocationSummary* DropTempsInstr::MakeLocationSummary(bool optimizing) const {
|
| return LocationSummary::Make(1,
|
| Location::SameAsFirstInput(),
|
| LocationSummary::kNoCall);
|
| @@ -1915,7 +1941,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* InstanceCallInstr::MakeLocationSummary() const {
|
| +LocationSummary* InstanceCallInstr::MakeLocationSummary(bool optimizing) const {
|
| return MakeCallSummary();
|
| }
|
|
|
| @@ -1976,7 +2002,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* StaticCallInstr::MakeLocationSummary() const {
|
| +LocationSummary* StaticCallInstr::MakeLocationSummary(bool optimizing) const {
|
| return MakeCallSummary();
|
| }
|
|
|
| @@ -2870,7 +2896,6 @@
|
| intptr_t original_deopt_id,
|
| MethodRecognizer::Kind recognized_kind)
|
| : inputs_(inputs),
|
| - locs_(NULL),
|
| recognized_kind_(recognized_kind) {
|
| ASSERT(inputs_->length() == ArgumentCountFor(recognized_kind_));
|
| for (intptr_t i = 0; i < inputs_->length(); ++i) {
|
| @@ -2978,7 +3003,6 @@
|
| intptr_t original_deopt_id,
|
| MergedMathInstr::Kind kind)
|
| : inputs_(inputs),
|
| - locs_(NULL),
|
| kind_(kind) {
|
| ASSERT(inputs_->length() == InputCountFor(kind_));
|
| for (intptr_t i = 0; i < inputs_->length(); ++i) {
|
|
|