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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 14935005: Implement a variation of scalar replacement for non-escaping allocations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 7 years, 7 months 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/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 3c686ef9c57319c74e89c150abc6ea69ceffd3c6..daa9d9662f2c0a4b91bb42f6f73a41dd2d628468 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -157,9 +157,12 @@ EffectSet LoadFieldInstr::Dependencies() const {
bool LoadFieldInstr::AttributesEqual(Instruction* other) const {
LoadFieldInstr* other_load = other->AsLoadField();
ASSERT(other_load != NULL);
- ASSERT((offset_in_bytes() != other_load->offset_in_bytes()) ||
- ((immutable_ == other_load->immutable_)));
- return offset_in_bytes() == other_load->offset_in_bytes();
+ if (field() != NULL) {
+ return (other_load->field() != NULL) &&
+ (field()->raw() == other_load->field()->raw());
+ }
+ return (other_load->field() == NULL) &&
+ (offset_in_bytes() == other_load->offset_in_bytes());
}
@@ -1167,21 +1170,14 @@ MethodRecognizer::Kind LoadFieldInstr::RecognizedKindFromArrayCid(
bool LoadFieldInstr::IsFixedLengthArrayCid(intptr_t cid) {
+ if (RawObject::IsTypedDataClassId(cid) ||
+ RawObject::IsExternalTypedDataClassId(cid)) {
+ return true;
+ }
+
switch (cid) {
case kArrayCid:
case kImmutableArrayCid:
- case kTypedDataInt8ArrayCid:
- case kTypedDataUint8ArrayCid:
- case kTypedDataUint8ClampedArrayCid:
- case kTypedDataInt16ArrayCid:
- case kTypedDataUint16ArrayCid:
- case kTypedDataInt32ArrayCid:
- case kTypedDataUint32ArrayCid:
- case kTypedDataInt64ArrayCid:
- case kTypedDataUint64ArrayCid:
- case kTypedDataFloat32ArrayCid:
- case kTypedDataFloat64ArrayCid:
- case kTypedDataFloat32x4ArrayCid:
return true;
default:
return false;
@@ -1295,7 +1291,7 @@ Instruction* BranchInstr::Canonicalize(FlowGraph* flow_graph) {
Value* use = comp->input_use_list();
if ((use->instruction() == this) && comp->HasOnlyUse(use)) {
RemoveEnvironment();
- InheritDeoptTarget(comp);
+ flow_graph->CopyDeoptTarget(this, comp);
comp->RemoveFromGraph();
SetComparison(comp);
@@ -1537,6 +1533,17 @@ void ConstraintInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+LocationSummary* MaterializeObjectInstr::MakeLocationSummary() const {
+ UNREACHABLE();
+ return NULL;
+}
+
+
+void MaterializeObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ UNREACHABLE();
+}
+
+
LocationSummary* StoreContextInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = 0;
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698