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

Unified Diff: runtime/vm/intermediate_language.h

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/flow_graph_range_analysis.cc ('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.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index ea0ef6131d73f645b93c42bca1c6bcd36fa95a65..248ec36ef63cbfb998ac1dd8e5c573a779e87d51 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3695,7 +3695,7 @@ class LoadCodeUnitsInstr : public TemplateDefinition<2, NoThrow> {
element_count_(element_count),
representation_(kTagged) {
ASSERT(element_count == 1 || element_count == 2 || element_count == 4);
- ASSERT(class_id == kOneByteStringCid || class_id == kTwoByteStringCid);
+ ASSERT(RawObject::IsStringClassId(class_id));
SetInputAt(0, str);
SetInputAt(1, index);
}
@@ -4213,6 +4213,12 @@ class LoadUntaggedInstr : public TemplateDefinition<1, NoThrow> {
DECLARE_INSTRUCTION(LoadUntagged)
virtual CompileType ComputeType() const;
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ ASSERT(idx == 0);
+ // The object may be tagged or untagged (for external objects).
+ return kNoRepresentation;
+ }
+
Value* object() const { return inputs_[0]; }
intptr_t offset() const { return offset_; }
« no previous file with comments | « runtime/vm/flow_graph_range_analysis.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698