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

Side by Side Diff: src/vm/program_relocator.cc

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_relocator.h ('k') | src/vm/refcounted.h » ('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 #include "src/shared/assert.h" 5 #include "src/shared/assert.h"
6 6
7 #include "src/vm/program_info_block.h" 7 #include "src/vm/program_info_block.h"
8 #include "src/vm/program_relocator.h" 8 #include "src/vm/program_relocator.h"
9 9
10 #ifdef VERBOSE 10 #ifdef VERBOSE
11 #define DEBUG_PRINT(...) fprintf(stderr, __VA_ARGS__) 11 #define DEBUG_PRINT(...) fprintf(stderr, __VA_ARGS__)
12 #else 12 #else
13 #define DEBUG_PRINT(...) 13 #define DEBUG_PRINT(...)
14 #endif 14 #endif
15 15
16 namespace fletch { 16 namespace dartino {
17 17
18 // Helper class that can be used as a visitor when iterating pointers/roots 18 // Helper class that can be used as a visitor when iterating pointers/roots
19 // to rebase them to a new address. It takes four arguments: 19 // to rebase them to a new address. It takes four arguments:
20 // 20 //
21 // from: the address, in memory, of the source data structure 21 // from: the address, in memory, of the source data structure
22 // target: the address, in memory, of the mirror copy that is to be 22 // target: the address, in memory, of the mirror copy that is to be
23 // updated 23 // updated
24 // host_base: the base address, in memory, of the heap that from is 24 // host_base: the base address, in memory, of the heap that from is
25 // allocated from 25 // allocated from
26 // rebase_base: the base address, in the address space we are rebasing to, where 26 // rebase_base: the base address, in the address space we are rebasing to, where
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 reinterpret_cast<ProgramInfoBlock*>(target_ + heap_size); 156 reinterpret_cast<ProgramInfoBlock*>(target_ + heap_size);
157 program_info->PopulateFromProgram(target_program); 157 program_info->PopulateFromProgram(target_program);
158 158
159 free(target_program); 159 free(target_program);
160 160
161 DEBUG_PRINT("Relocation complete, result is %d bytes...\n", target.length()); 161 DEBUG_PRINT("Relocation complete, result is %d bytes...\n", target.length());
162 162
163 return total_size; 163 return total_size;
164 } 164 }
165 165
166 } // namespace fletch 166 } // namespace dartino
OLDNEW
« no previous file with comments | « src/vm/program_relocator.h ('k') | src/vm/refcounted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698