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

Unified Diff: runtime/vm/intermediate_language_arm64.cc

Issue 765743003: Support use of external strings as inputs to LoadCodeUnitsInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: safety Created 6 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_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm64.cc
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 47f908907f79f49d612154cde2a3d6cffb0746b4..fedbd340f9e7ad6df3a9273cfb441a62132c29d1 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -903,9 +903,14 @@ LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Isolate* isolate,
void LoadUntaggedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- const Register object = locs()->in(0).reg();
+ const Register obj = locs()->in(0).reg();
const Register result = locs()->out(0).reg();
- __ LoadFieldFromOffset(result, object, offset(), PP);
+ if (object()->definition()->representation() == kUntagged) {
+ __ LoadFromOffset(result, obj, offset(), PP);
+ } else {
+ ASSERT(object()->definition()->representation() == kTagged);
+ __ LoadFieldFromOffset(result, obj, offset(), PP);
+ }
}
@@ -1149,11 +1154,12 @@ LocationSummary* LoadCodeUnitsInstr::MakeLocationSummary(Isolate* isolate,
void LoadCodeUnitsInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- const Register array = locs()->in(0).reg();
+ // The string register points to the backing store for external strings.
+ const Register str = locs()->in(0).reg();
const Location index = locs()->in(1);
Address element_address = __ ElementAddressForRegIndex(
- true, IsExternal(), class_id(), index_scale(), array, index.reg());
+ true, IsExternal(), class_id(), index_scale(), str, index.reg());
// Warning: element_address may use register TMP as base.
Register result = locs()->out(0).reg();
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698