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

Unified Diff: runtime/vm/intermediate_language.h

Issue 800833002: LoadCodeUnitsInstr can be passed both tagged and untagged string input. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | no next file » | 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 02812cb6bf686de24a81aef70eac0bb8d6d62682..9e83d1fd24844b682dae9b79b891a02719b313e6 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3710,6 +3710,15 @@ class LoadCodeUnitsInstr : public TemplateDefinition<2, NoThrow> {
DECLARE_INSTRUCTION(LoadCodeUnits)
virtual CompileType ComputeType() const;
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ if (idx == 0) {
+ // The string may be tagged or untagged (for external strings).
+ return kNoRepresentation;
+ }
+ ASSERT(idx == 1);
+ return kTagged;
+ }
+
bool IsExternal() const {
return array()->definition()->representation() == kUntagged;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698