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

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: address Ivan's comments 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
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intermediate_language_ia32.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 6105fc3538f7ee06f73c73edc74f7ab6154a9978..d11cc8461ada366a4559fd6181ab33d7c0248756 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:
+ bool CanValueBeSmi() const {
+ const intptr_t cid = value()->Type()->ToNullableCid();
+ // Write barrier is skipped for nullable and non-nullable smis.
+ ASSERT(cid != kSmiCid);
+ return (cid == kDynamicCid);
+ }
+
const Field& field_;
const StoreBarrierType emit_store_barrier_;
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698