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

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: Created 6 years, 1 month 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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index ea0ef6131d73f645b93c42bca1c6bcd36fa95a65..0da3dc9a32ed6b30691223fcbda4fc273f190894 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 array may be tagged or untagged (for external arrays).
Vyacheslav Egorov (Google) 2014/11/27 14:27:43 I would say s/array/object/ to make it less confus
zerny-google 2014/12/01 15:33:30 Done.
+ return kNoRepresentation;
+ }
+
Value* object() const { return inputs_[0]; }
intptr_t offset() const { return offset_; }

Powered by Google App Engine
This is Rietveld 408576698