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

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

Issue 10448079: Address review comments in commited cl (issue 10460002). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 const intptr_t token_index_; 1001 const intptr_t token_index_;
1002 const intptr_t try_index_; 1002 const intptr_t try_index_;
1003 ZoneGrowableArray<Value*>* const elements_; 1003 ZoneGrowableArray<Value*>* const elements_;
1004 1004
1005 DISALLOW_COPY_AND_ASSIGN(CreateArrayComp); 1005 DISALLOW_COPY_AND_ASSIGN(CreateArrayComp);
1006 }; 1006 };
1007 1007
1008 1008
1009 class CreateClosureComp : public Computation { 1009 class CreateClosureComp : public Computation {
1010 public: 1010 public:
1011 // 'type_arguments' is null if function() does not require type arguments.
1012 CreateClosureComp(ClosureNode* node, 1011 CreateClosureComp(ClosureNode* node,
1013 intptr_t try_index, 1012 intptr_t try_index,
1014 Value* type_arguments) 1013 Value* type_arguments)
1015 : ast_node_(*node), 1014 : ast_node_(*node),
1016 try_index_(try_index), 1015 try_index_(try_index),
1017 type_arguments_(type_arguments) {} 1016 type_arguments_(type_arguments) {
1017 ASSERT(type_arguments != NULL);
1018 }
1018 1019
1019 DECLARE_COMPUTATION(CreateClosure) 1020 DECLARE_COMPUTATION(CreateClosure)
1020 1021
1021 intptr_t token_index() const { return ast_node_.token_index(); } 1022 intptr_t token_index() const { return ast_node_.token_index(); }
1022 intptr_t try_index() const { return try_index_; } 1023 intptr_t try_index() const { return try_index_; }
1023 const Function& function() const { return ast_node_.function(); } 1024 const Function& function() const { return ast_node_.function(); }
1024 Value* type_arguments() const { return type_arguments_; } 1025 Value* type_arguments() const { return type_arguments_; }
1025 1026
1026 virtual intptr_t InputCount() const; 1027 virtual intptr_t InputCount() const;
1027 virtual Value* InputAt(intptr_t i) const { 1028 virtual Value* InputAt(intptr_t i) const {
1028 return i == 0 ? type_arguments() : NULL; 1029 return i == 0 ? type_arguments() : NULL;
srdjan 2012/05/30 17:19:43 InputCount can be two, but InputAt(1) is always NU
regis 2012/05/30 18:08:34 I changed CreateClosureComp to be a TemplateComput
1029 } 1030 }
1030 1031
1031 virtual void PrintOperandsTo(BufferFormatter* f) const; 1032 virtual void PrintOperandsTo(BufferFormatter* f) const;
1032 1033
1033 private: 1034 private:
1034 const ClosureNode& ast_node_; 1035 const ClosureNode& ast_node_;
1035 const intptr_t try_index_; 1036 const intptr_t try_index_;
1036 Value* type_arguments_; 1037 Value* type_arguments_;
1037 1038
1038 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp); 1039 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp);
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 const GrowableArray<BlockEntryInstr*>& block_order_; 1892 const GrowableArray<BlockEntryInstr*>& block_order_;
1892 1893
1893 private: 1894 private:
1894 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 1895 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
1895 }; 1896 };
1896 1897
1897 1898
1898 } // namespace dart 1899 } // namespace dart
1899 1900
1900 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 1901 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698