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

Side by Side Diff: src/vm/dartino_relocation_api_impl.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/dartino_relocation_api_impl.h ('k') | src/vm/debug_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE.md file.
4
5 #include "src/vm/dartino_relocation_api_impl.h"
6 #include "src/vm/object_memory.h"
7 #include "src/vm/program.h"
8 #include "src/vm/program_info_block.h"
9 #include "src/vm/program_relocator.h"
10
11 size_t DartinoGetProgramSize(DartinoProgram program) {
12 dartino::Program* dartino_program =
13 reinterpret_cast<dartino::Program*>(program);
14 return
15 dartino_program->program_heap_size() + sizeof(dartino::ProgramInfoBlock);
16 }
17
18 int DartinoRelocateProgram(DartinoProgram program, void* target,
19 uintptr_t base) {
20 if (base % dartino::kPageSize != 0) return -1;
21 dartino::Program* dartino_program =
22 reinterpret_cast<dartino::Program*>(program);
23 dartino::ProgramHeapRelocator relocator(
24 dartino_program, reinterpret_cast<uint8*>(target), base);
25 return relocator.Relocate();
26 }
OLDNEW
« no previous file with comments | « src/vm/dartino_relocation_api_impl.h ('k') | src/vm/debug_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698