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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12438032: Use shorter write-barrier filtering sequence when value is known to be non-smi. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 6105fc3538f7ee06f73c73edc74f7ab6154a9978..114edfda49c049ef7a0d6212c76fda641f766832 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -2837,6 +2837,13 @@ class StoreInstanceFieldInstr : public TemplateDefinition<2> {
virtual bool HasSideEffect() const { return true; }
private:
+ ValueSminess CanValueBeSmi() const {
Ivan Posva 2013/03/22 04:11:35 Somehow I have an issue with the ValueSminess enum
Vyacheslav Egorov (Google) 2013/03/22 11:22:50 Done.
+ const intptr_t cid = value()->Type()->ToNullableCid();
+ // Write barrier is skipped for nullable and non-nullable smis.
+ ASSERT(cid != kSmiCid);
+ return (cid == kDynamicCid) ? kValueCanBeSmi : kValueIsNotSmi;
+ }
+
const Field& field_;
const StoreBarrierType emit_store_barrier_;

Powered by Google App Engine
This is Rietveld 408576698