OLD | NEW |
---|---|
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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_FUNCTION_BODY_DECODER_IMPL_H_ | 5 #ifndef V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ |
6 #define V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ | 6 #define V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ |
7 | 7 |
8 #include "src/wasm/decoder.h" | 8 #include "src/wasm/decoder.h" |
9 #include "src/wasm/wasm-opcodes.h" | 9 #include "src/wasm/wasm-opcodes.h" |
10 | 10 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 return true; | 137 return true; |
138 case kLocalF32: | 138 case kLocalF32: |
139 *result = kWasmF32; | 139 *result = kWasmF32; |
140 return true; | 140 return true; |
141 case kLocalF64: | 141 case kLocalF64: |
142 *result = kWasmF64; | 142 *result = kWasmF64; |
143 return true; | 143 return true; |
144 case kLocalS128: | 144 case kLocalS128: |
145 *result = kWasmS128; | 145 *result = kWasmS128; |
146 return true; | 146 return true; |
147 case kLocalS4: | |
148 *result = kWasmS4; | |
bradnelson
2017/02/16 23:18:30
Maybe S1x4 for consistency?
Would using SB4/8/16
bbudge
2017/02/17 23:39:56
I like S1xN. I'm also going to change the MachineT
| |
149 return true; | |
150 case kLocalS8: | |
151 *result = kWasmS8; | |
152 return true; | |
153 case kLocalS16: | |
154 *result = kWasmS16; | |
155 return true; | |
147 default: | 156 default: |
148 *result = kWasmStmt; | 157 *result = kWasmStmt; |
149 return false; | 158 return false; |
150 } | 159 } |
151 } | 160 } |
152 ValueType read_entry(unsigned index) { | 161 ValueType read_entry(unsigned index) { |
153 DCHECK_LT(index, arity); | 162 DCHECK_LT(index, arity); |
154 ValueType result; | 163 ValueType result; |
155 CHECK(decode_local_type(types[index], &result)); | 164 CHECK(decode_local_type(types[index], &result)); |
156 return result; | 165 return result; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
307 shift = decoder->checked_read_u8(pc, 2, "shift"); | 316 shift = decoder->checked_read_u8(pc, 2, "shift"); |
308 length = 1; | 317 length = 1; |
309 } | 318 } |
310 }; | 319 }; |
311 | 320 |
312 } // namespace wasm | 321 } // namespace wasm |
313 } // namespace internal | 322 } // namespace internal |
314 } // namespace v8 | 323 } // namespace v8 |
315 | 324 |
316 #endif // V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ | 325 #endif // V8_WASM_FUNCTION_BODY_DECODER_IMPL_H_ |
OLD | NEW |