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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 563973004: Call special VM interpolate for single element interpolation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 3 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/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.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 3782 matching lines...) Expand 10 before | Expand all | Expand 10 after
3793 3793
3794 private: 3794 private:
3795 const intptr_t cid_; 3795 const intptr_t cid_;
3796 3796
3797 DISALLOW_COPY_AND_ASSIGN(StringToCharCodeInstr); 3797 DISALLOW_COPY_AND_ASSIGN(StringToCharCodeInstr);
3798 }; 3798 };
3799 3799
3800 3800
3801 class StringInterpolateInstr : public TemplateDefinition<1> { 3801 class StringInterpolateInstr : public TemplateDefinition<1> {
3802 public: 3802 public:
3803 StringInterpolateInstr(Value* value, intptr_t token_pos) 3803 StringInterpolateInstr(Value* value, intptr_t token_pos, bool is_singleton)
3804 : token_pos_(token_pos), function_(Function::Handle()) { 3804 : token_pos_(token_pos),
3805 function_(Function::Handle()),
3806 is_singleton_(is_singleton) {
3805 SetInputAt(0, value); 3807 SetInputAt(0, value);
3806 } 3808 }
3807 3809
3808 Value* value() const { return inputs_[0]; } 3810 Value* value() const { return inputs_[0]; }
3809 virtual intptr_t token_pos() const { return token_pos_; } 3811 virtual intptr_t token_pos() const { return token_pos_; }
3810 3812
3811 virtual CompileType ComputeType() const; 3813 virtual CompileType ComputeType() const;
3812 // Issues a static call to Dart code which calls toString on objects. 3814 // Issues a static call to Dart code which calls toString on objects.
3813 virtual EffectSet Effects() const { return EffectSet::All(); } 3815 virtual EffectSet Effects() const { return EffectSet::All(); }
3814 virtual bool CanDeoptimize() const { return true; } 3816 virtual bool CanDeoptimize() const { return true; }
3815 virtual bool MayThrow() const { return true; } 3817 virtual bool MayThrow() const { return true; }
3816 3818
3817 const Function& CallFunction() const; 3819 const Function& CallFunction() const;
3818 3820
3819 virtual Definition* Canonicalize(FlowGraph* flow_graph); 3821 virtual Definition* Canonicalize(FlowGraph* flow_graph);
3820 3822
3821 DECLARE_INSTRUCTION(StringInterpolate) 3823 DECLARE_INSTRUCTION(StringInterpolate)
3822 3824
3823 private: 3825 private:
3824 const intptr_t token_pos_; 3826 const intptr_t token_pos_;
3825 Function& function_; 3827 Function& function_;
3828 const bool is_singleton_;
3826 3829
3827 DISALLOW_COPY_AND_ASSIGN(StringInterpolateInstr); 3830 DISALLOW_COPY_AND_ASSIGN(StringInterpolateInstr);
3828 }; 3831 };
3829 3832
3830 3833
3831 class StoreIndexedInstr : public TemplateDefinition<3> { 3834 class StoreIndexedInstr : public TemplateDefinition<3> {
3832 public: 3835 public:
3833 StoreIndexedInstr(Value* array, 3836 StoreIndexedInstr(Value* array,
3834 Value* index, 3837 Value* index,
3835 Value* value, 3838 Value* value,
(...skipping 4614 matching lines...) Expand 10 before | Expand all | Expand 10 after
8450 Isolate* isolate, bool opt) const { \ 8453 Isolate* isolate, bool opt) const { \
8451 UNIMPLEMENTED(); \ 8454 UNIMPLEMENTED(); \
8452 return NULL; \ 8455 return NULL; \
8453 } \ 8456 } \
8454 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8457 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8455 8458
8456 8459
8457 } // namespace dart 8460 } // namespace dart
8458 8461
8459 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8462 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698