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

Side by Side Diff: src/vm/program_info_block.h

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/vm/program_folder.cc ('k') | src/vm/program_info_block.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #ifndef SRC_VM_PROGRAM_INFO_BLOCK_H_ 5 #ifndef SRC_VM_PROGRAM_INFO_BLOCK_H_
6 #define SRC_VM_PROGRAM_INFO_BLOCK_H_ 6 #define SRC_VM_PROGRAM_INFO_BLOCK_H_
7 7
8 #include "src/vm/program.h" 8 #include "src/vm/program.h"
9 9
10 namespace fletch { 10 namespace dartino {
11 class ProgramInfoBlock { 11 class ProgramInfoBlock {
12 public: 12 public:
13 ProgramInfoBlock(); 13 ProgramInfoBlock();
14 14
15 void PopulateFromProgram(Program* program); 15 void PopulateFromProgram(Program* program);
16 void WriteToProgram(Program* program); 16 void WriteToProgram(Program* program);
17 17
18 Object** roots() { return &entry_; } 18 Object** roots() { return &entry_; }
19 19
20 void* end_of_roots() { return &main_arity_; } 20 void* end_of_roots() { return &main_arity_; }
21 21
22 void set_main_arity(int arity) { main_arity_ = arity; } 22 void set_main_arity(int arity) { main_arity_ = arity; }
23 int main_arity() { return main_arity_; } 23 int main_arity() { return main_arity_; }
24 24
25 private: 25 private:
26 // This has to remain in sync with all the roots that are traversed by 26 // This has to remain in sync with all the roots that are traversed by
27 // IterateRoots in Program. Also, the type does not really matter as long 27 // IterateRoots in Program. Also, the type does not really matter as long
28 // as it also is a pointer type and they won't be used in order (as in 28 // as it also is a pointer type and they won't be used in order (as in
29 // their names are meaningless). 29 // their names are meaningless).
30 Object* entry_; 30 Object* entry_;
31 #define ROOT_DECLARATION(type, name, CamelName) type* name##_; 31 #define ROOT_DECLARATION(type, name, CamelName) type* name##_;
32 ROOTS_DO(ROOT_DECLARATION) 32 ROOTS_DO(ROOT_DECLARATION)
33 #undef ROOT_DECLARATION 33 #undef ROOT_DECLARATION
34 // We also store the arity of main. This field is also used as a marker 34 // We also store the arity of main. This field is also used as a marker
35 // of the end of the roots data structure. 35 // of the end of the roots data structure.
36 intptr_t main_arity_; 36 intptr_t main_arity_;
37 }; 37 };
38 38
39 } // namespace fletch 39 } // namespace dartino
40 #endif // SRC_VM_PROGRAM_INFO_BLOCK_H_ 40 #endif // SRC_VM_PROGRAM_INFO_BLOCK_H_
OLDNEW
« no previous file with comments | « src/vm/program_folder.cc ('k') | src/vm/program_info_block.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698