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

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

Issue 9664062: Support allocating and calling closures in the new non-optimizing compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
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_FLOW_GRAPH_COMPILER_X64_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_X64_H_
6 #define VM_FLOW_GRAPH_COMPILER_X64_H_ 6 #define VM_FLOW_GRAPH_COMPILER_X64_H_
7 7
8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_
9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_x64.h. 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_x64.h.
10 #endif 10 #endif
(...skipping 24 matching lines...) Expand all
35 void FinalizeExceptionHandlers(const Code& code); 35 void FinalizeExceptionHandlers(const Code& code);
36 36
37 private: 37 private:
38 struct BlockInfo : public ZoneAllocated { 38 struct BlockInfo : public ZoneAllocated {
39 public: 39 public:
40 BlockInfo() : label() { } 40 BlockInfo() : label() { }
41 41
42 Label label; 42 Label label;
43 }; 43 };
44 44
45 int stack_local_count() const { return stack_local_count_; }
46 void set_stack_local_count(int count) { stack_local_count_ = count; }
47 BlockEntryInstr* current_block() const { return current_block_; } 45 BlockEntryInstr* current_block() const { return current_block_; }
48 46
49 // Bail out of the flow graph compiler. Does not return to the caller. 47 // Bail out of the flow graph compiler. Does not return to the caller.
50 void Bailout(const char* reason); 48 void Bailout(const char* reason);
51 49
52 virtual void VisitBlocks(const GrowableArray<BlockEntryInstr*>& blocks); 50 virtual void VisitBlocks(const GrowableArray<BlockEntryInstr*>& blocks);
53 51
54 // Emit code to perform a computation, leaving its value in RAX. 52 // Emit code to perform a computation, leaving its value in RAX.
55 #define DECLARE_VISIT_COMPUTATION(ShortName, ClassName) \ 53 #define DECLARE_VISIT_COMPUTATION(ShortName, ClassName) \
56 virtual void Visit##ShortName(ClassName* comp); 54 virtual void Visit##ShortName(ClassName* comp);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 const ParsedFunction& parsed_function_; 94 const ParsedFunction& parsed_function_;
97 const GrowableArray<BlockEntryInstr*>* blocks_; 95 const GrowableArray<BlockEntryInstr*>* blocks_;
98 96
99 // Compiler specific per-block state. Indexed by block number, so not 97 // Compiler specific per-block state. Indexed by block number, so not
100 // necessarily the same order as the array of blocks. 98 // necessarily the same order as the array of blocks.
101 GrowableArray<BlockInfo*> block_info_; 99 GrowableArray<BlockInfo*> block_info_;
102 100
103 BlockEntryInstr* current_block_; 101 BlockEntryInstr* current_block_;
104 102
105 CodeGenerator::DescriptorList* pc_descriptors_list_; 103 CodeGenerator::DescriptorList* pc_descriptors_list_;
106 int stack_local_count_;
107 104
108 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 105 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
109 }; 106 };
110 107
111 } // namespace dart 108 } // namespace dart
112 109
113 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ 110 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698