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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 99573005: Add mutable double boxes for fields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698