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

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

Issue 1661713003: [wasm] Rename local_int32_count to local_i32_count and similar textual replacements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 15 matching lines...) Expand all
26 uint32_t BodySize() const; 26 uint32_t BodySize() const;
27 uint32_t NameSize() const; 27 uint32_t NameSize() const;
28 void Serialize(byte* buffer, byte** header, byte** body) const; 28 void Serialize(byte* buffer, byte** header, byte** body) const;
29 29
30 private: 30 private:
31 WasmFunctionEncoder(Zone* zone, LocalType return_type, bool exported, 31 WasmFunctionEncoder(Zone* zone, LocalType return_type, bool exported,
32 bool external); 32 bool external);
33 friend class WasmFunctionBuilder; 33 friend class WasmFunctionBuilder;
34 uint16_t signature_index_; 34 uint16_t signature_index_;
35 ZoneVector<LocalType> params_; 35 ZoneVector<LocalType> params_;
36 uint16_t local_int32_count_; 36 uint16_t local_i32_count_;
37 uint16_t local_int64_count_; 37 uint16_t local_i64_count_;
38 uint16_t local_float32_count_; 38 uint16_t local_f32_count_;
39 uint16_t local_float64_count_; 39 uint16_t local_f64_count_;
40 bool exported_; 40 bool exported_;
41 bool external_; 41 bool external_;
42 ZoneVector<uint8_t> body_; 42 ZoneVector<uint8_t> body_;
43 ZoneVector<char> name_; 43 ZoneVector<char> name_;
44 44
45 bool HasLocals() const { 45 bool HasLocals() const {
46 return (local_int32_count_ + local_int64_count_ + local_float32_count_ + 46 return (local_i32_count_ + local_i64_count_ + local_f32_count_ +
47 local_float64_count_) > 0; 47 local_f64_count_) > 0;
48 } 48 }
49 49
50 bool HasName() const { return exported_ && name_.size() > 0; } 50 bool HasName() const { return exported_ && name_.size() > 0; }
51 }; 51 };
52 52
53 class WasmFunctionBuilder : public ZoneObject { 53 class WasmFunctionBuilder : public ZoneObject {
54 public: 54 public:
55 uint16_t AddParam(LocalType type); 55 uint16_t AddParam(LocalType type);
56 uint16_t AddLocal(LocalType type); 56 uint16_t AddLocal(LocalType type);
57 void ReturnType(LocalType type); 57 void ReturnType(LocalType type);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ZoneVector<std::pair<MachineType, bool>> globals_; 147 ZoneVector<std::pair<MachineType, bool>> globals_;
148 SignatureMap signature_map_; 148 SignatureMap signature_map_;
149 }; 149 };
150 150
151 std::vector<uint8_t> UnsignedLEB128From(uint32_t result); 151 std::vector<uint8_t> UnsignedLEB128From(uint32_t result);
152 } // namespace wasm 152 } // namespace wasm
153 } // namespace internal 153 } // namespace internal
154 } // namespace v8 154 } // namespace v8
155 155
156 #endif // V8_WASM_ENCODER_H_ 156 #endif // V8_WASM_ENCODER_H_
OLDNEW
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | src/wasm/encoder.cc » ('j') | src/wasm/wasm-module.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698