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

Side by Side Diff: src/wasm/encoder.h

Issue 1830663002: [wasm] Binary 11: AST changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/wasm/ast-decoder.cc ('k') | src/wasm/encoder.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project 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 V8_WASM_ENCODER_H_ 5 #ifndef V8_WASM_ENCODER_H_
6 #define V8_WASM_ENCODER_H_ 6 #define V8_WASM_ENCODER_H_
7 7
8 #include "src/signature.h" 8 #include "src/signature.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 uint16_t AddParam(LocalType type); 50 uint16_t AddParam(LocalType type);
51 uint16_t AddLocal(LocalType type); 51 uint16_t AddLocal(LocalType type);
52 void ReturnType(LocalType type); 52 void ReturnType(LocalType type);
53 void EmitVarInt(uint32_t val); 53 void EmitVarInt(uint32_t val);
54 void EmitCode(const byte* code, uint32_t code_size); 54 void EmitCode(const byte* code, uint32_t code_size);
55 void EmitCode(const byte* code, uint32_t code_size, 55 void EmitCode(const byte* code, uint32_t code_size,
56 const uint32_t* local_indices, uint32_t indices_size); 56 const uint32_t* local_indices, uint32_t indices_size);
57 void Emit(WasmOpcode opcode); 57 void Emit(WasmOpcode opcode);
58 void EmitGetLocal(uint32_t index); 58 void EmitGetLocal(uint32_t index);
59 void EmitSetLocal(uint32_t index); 59 void EmitSetLocal(uint32_t index);
60 void EmitI32Const(int32_t val);
60 void EmitWithU8(WasmOpcode opcode, const byte immediate); 61 void EmitWithU8(WasmOpcode opcode, const byte immediate);
61 void EmitWithU8U8(WasmOpcode opcode, const byte imm1, const byte imm2); 62 void EmitWithU8U8(WasmOpcode opcode, const byte imm1, const byte imm2);
62 void EmitWithVarInt(WasmOpcode opcode, uint32_t immediate); 63 void EmitWithVarInt(WasmOpcode opcode, uint32_t immediate);
63 uint32_t EmitEditableVarIntImmediate(); 64 uint32_t EmitEditableVarIntImmediate();
64 void EditVarIntImmediate(uint32_t offset, const uint32_t immediate); 65 void EditVarIntImmediate(uint32_t offset, const uint32_t immediate);
65 void Exported(uint8_t flag); 66 void Exported(uint8_t flag);
66 void External(uint8_t flag); 67 void External(uint8_t flag);
67 void SetName(const unsigned char* name, int name_length); 68 void SetName(const unsigned char* name, int name_length);
68 WasmFunctionEncoder* Build(Zone* zone, WasmModuleBuilder* mb) const; 69 WasmFunctionEncoder* Build(Zone* zone, WasmModuleBuilder* mb) const;
69 70
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ZoneVector<std::pair<MachineType, bool>> globals_; 150 ZoneVector<std::pair<MachineType, bool>> globals_;
150 SignatureMap signature_map_; 151 SignatureMap signature_map_;
151 int start_function_index_; 152 int start_function_index_;
152 }; 153 };
153 154
154 } // namespace wasm 155 } // namespace wasm
155 } // namespace internal 156 } // namespace internal
156 } // namespace v8 157 } // namespace v8
157 158
158 #endif // V8_WASM_ENCODER_H_ 159 #endif // V8_WASM_ENCODER_H_
OLDNEW
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | src/wasm/encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698