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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2830 && (emit_store_barrier_ == kEmitStoreBarrier); 2830 && (emit_store_barrier_ == kEmitStoreBarrier);
2831 } 2831 }
2832 2832
2833 virtual void PrintOperandsTo(BufferFormatter* f) const; 2833 virtual void PrintOperandsTo(BufferFormatter* f) const;
2834 2834
2835 virtual bool CanDeoptimize() const { return false; } 2835 virtual bool CanDeoptimize() const { return false; }
2836 2836
2837 virtual bool HasSideEffect() const { return true; } 2837 virtual bool HasSideEffect() const { return true; }
2838 2838
2839 private: 2839 private:
2840 bool CanValueBeSmi() const {
2841 const intptr_t cid = value()->Type()->ToNullableCid();
2842 // Write barrier is skipped for nullable and non-nullable smis.
2843 ASSERT(cid != kSmiCid);
2844 return (cid == kDynamicCid);
2845 }
2846
2840 const Field& field_; 2847 const Field& field_;
2841 const StoreBarrierType emit_store_barrier_; 2848 const StoreBarrierType emit_store_barrier_;
2842 2849
2843 DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr); 2850 DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr);
2844 }; 2851 };
2845 2852
2846 2853
2847 class GuardFieldInstr : public TemplateInstruction<1> { 2854 class GuardFieldInstr : public TemplateInstruction<1> {
2848 public: 2855 public:
2849 GuardFieldInstr(Value* value, 2856 GuardFieldInstr(Value* value,
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
4668 ForwardInstructionIterator* current_iterator_; 4675 ForwardInstructionIterator* current_iterator_;
4669 4676
4670 private: 4677 private:
4671 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4678 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4672 }; 4679 };
4673 4680
4674 4681
4675 } // namespace dart 4682 } // namespace dart
4676 4683
4677 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4684 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« 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