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

Side by Side Diff: courgette/courgette.h

Issue 2476863004: [Courgette] AssemblyProgram: Serialize data to single raw buffer, instead of storing pointer of obj… (Closed)
Patch Set: Sync and merge. Created 4 years, 1 month 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 | « courgette/assembly_program.cc ('k') | courgette/memory_allocator.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COURGETTE_COURGETTE_H_ 5 #ifndef COURGETTE_COURGETTE_H_
6 #define COURGETTE_COURGETTE_H_ 6 #define COURGETTE_COURGETTE_H_
7 7
8 #include <stddef.h> // Required to define size_t on GCC 8 #include <cstddef>
9 #include <cstdint>
9 10
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 12
12 namespace courgette { 13 namespace courgette {
13 14
14 // Status codes for Courgette APIs. 15 // Status codes for Courgette APIs.
15 // 16 //
16 // Client code should only rely on the distintion between C_OK and the other 17 // Client code should only rely on the distintion between C_OK and the other
17 // status codes. 18 // status codes.
18 // 19 //
(...skipping 26 matching lines...) Expand all
45 C_SERIALIZATION_FAILED = 22, // 46 C_SERIALIZATION_FAILED = 22, //
46 C_DESERIALIZATION_FAILED = 23, // 47 C_DESERIALIZATION_FAILED = 23, //
47 C_INPUT_NOT_RECOGNIZED = 24, // Unrecognized input (not an executable). 48 C_INPUT_NOT_RECOGNIZED = 24, // Unrecognized input (not an executable).
48 C_DISASSEMBLY_FAILED = 25, // 49 C_DISASSEMBLY_FAILED = 25, //
49 C_ASSEMBLY_FAILED = 26, // 50 C_ASSEMBLY_FAILED = 26, //
50 C_ADJUSTMENT_FAILED = 27, // 51 C_ADJUSTMENT_FAILED = 27, //
51 }; 52 };
52 53
53 // What type of executable is something 54 // What type of executable is something
54 // This is part of the patch format. Never reuse an id number. 55 // This is part of the patch format. Never reuse an id number.
55 enum ExecutableType { 56 enum ExecutableType : uint8_t {
56 EXE_UNKNOWN = 0, 57 EXE_UNKNOWN = 0,
57 EXE_WIN_32_X86 = 1, 58 EXE_WIN_32_X86 = 1,
58 EXE_ELF_32_X86 = 2, 59 EXE_ELF_32_X86 = 2,
59 EXE_ELF_32_ARM = 3, 60 EXE_ELF_32_ARM = 3,
60 EXE_WIN_32_X64 = 4, 61 EXE_WIN_32_X64 = 4,
61 }; 62 };
62 63
63 class SinkStream; 64 class SinkStream;
64 class SinkStreamSet; 65 class SinkStreamSet;
65 class SourceStream; 66 class SourceStream;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // |buffer| in an undefined state. 99 // |buffer| in an undefined state.
99 Status Assemble(EncodedProgram* encoded, SinkStream* buffer); 100 Status Assemble(EncodedProgram* encoded, SinkStream* buffer);
100 101
101 // Adjusts |program| to look more like |model|. 102 // Adjusts |program| to look more like |model|.
102 // 103 //
103 Status Adjust(const AssemblyProgram& model, AssemblyProgram *program); 104 Status Adjust(const AssemblyProgram& model, AssemblyProgram *program);
104 105
105 } // namespace courgette 106 } // namespace courgette
106 107
107 #endif // COURGETTE_COURGETTE_H_ 108 #endif // COURGETTE_COURGETTE_H_
OLDNEW
« no previous file with comments | « courgette/assembly_program.cc ('k') | courgette/memory_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698