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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11867020: Fix bug in optimization in the presence of externalized strings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
« runtime/vm/dart_api_impl_test.cc ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 17269)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -102,6 +102,17 @@
return true;
}
Vyacheslav Egorov (Google) 2013/01/18 13:34:44 new line here
Florian Schneider 2013/01/18 16:22:38 Done.
+bool CheckClassInstr::AffectedBySideEffect() const {
+ // The class-id of string objects is not invariant: Externalization of strings
+ // via the API can change the class-id.
+ for (intptr_t i = 0; i < unary_checks().NumberOfChecks(); i++) {
Vyacheslav Egorov (Google) 2013/01/18 13:34:44 optimizer has ICDataHasReceiverClassId that does s
Florian Schneider 2013/01/18 16:22:38 Done.
+ intptr_t cid = unary_checks().GetReceiverClassIdAt(i);
+ if (cid == kOneByteStringCid || cid == kTwoByteStringCid) {
+ return true;
+ }
+ }
+ return false;
+}
Vyacheslav Egorov (Google) 2013/01/18 13:34:44 new line here
Florian Schneider 2013/01/18 16:22:38 Done.
bool CheckArrayBoundInstr::AttributesEqual(Instruction* other) const {
CheckArrayBoundInstr* other_check = other->AsCheckArrayBound();
« runtime/vm/dart_api_impl_test.cc ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698