OLD | NEW |
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 #include "src/signature.h" | 5 #include "src/signature.h" |
6 | 6 |
7 #include "src/base/platform/elapsed-timer.h" | 7 #include "src/base/platform/elapsed-timer.h" |
8 #include "src/bit-vector.h" | 8 #include "src/bit-vector.h" |
9 #include "src/flags.h" | 9 #include "src/flags.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 case kExprI64LoadMem: | 1151 case kExprI64LoadMem: |
1152 len = DecodeLoadMem(kWasmI64, MachineType::Int64()); | 1152 len = DecodeLoadMem(kWasmI64, MachineType::Int64()); |
1153 break; | 1153 break; |
1154 case kExprF32LoadMem: | 1154 case kExprF32LoadMem: |
1155 len = DecodeLoadMem(kWasmF32, MachineType::Float32()); | 1155 len = DecodeLoadMem(kWasmF32, MachineType::Float32()); |
1156 break; | 1156 break; |
1157 case kExprF64LoadMem: | 1157 case kExprF64LoadMem: |
1158 len = DecodeLoadMem(kWasmF64, MachineType::Float64()); | 1158 len = DecodeLoadMem(kWasmF64, MachineType::Float64()); |
1159 break; | 1159 break; |
1160 case kExprS128LoadMem: | 1160 case kExprS128LoadMem: |
| 1161 CHECK_PROTOTYPE_OPCODE(wasm_simd_prototype); |
1161 len = DecodeLoadMem(kWasmS128, MachineType::Simd128()); | 1162 len = DecodeLoadMem(kWasmS128, MachineType::Simd128()); |
1162 break; | 1163 break; |
1163 case kExprI32StoreMem8: | 1164 case kExprI32StoreMem8: |
1164 len = DecodeStoreMem(kWasmI32, MachineType::Int8()); | 1165 len = DecodeStoreMem(kWasmI32, MachineType::Int8()); |
1165 break; | 1166 break; |
1166 case kExprI32StoreMem16: | 1167 case kExprI32StoreMem16: |
1167 len = DecodeStoreMem(kWasmI32, MachineType::Int16()); | 1168 len = DecodeStoreMem(kWasmI32, MachineType::Int16()); |
1168 break; | 1169 break; |
1169 case kExprI32StoreMem: | 1170 case kExprI32StoreMem: |
1170 len = DecodeStoreMem(kWasmI32, MachineType::Int32()); | 1171 len = DecodeStoreMem(kWasmI32, MachineType::Int32()); |
(...skipping 10 matching lines...) Expand all Loading... |
1181 case kExprI64StoreMem: | 1182 case kExprI64StoreMem: |
1182 len = DecodeStoreMem(kWasmI64, MachineType::Int64()); | 1183 len = DecodeStoreMem(kWasmI64, MachineType::Int64()); |
1183 break; | 1184 break; |
1184 case kExprF32StoreMem: | 1185 case kExprF32StoreMem: |
1185 len = DecodeStoreMem(kWasmF32, MachineType::Float32()); | 1186 len = DecodeStoreMem(kWasmF32, MachineType::Float32()); |
1186 break; | 1187 break; |
1187 case kExprF64StoreMem: | 1188 case kExprF64StoreMem: |
1188 len = DecodeStoreMem(kWasmF64, MachineType::Float64()); | 1189 len = DecodeStoreMem(kWasmF64, MachineType::Float64()); |
1189 break; | 1190 break; |
1190 case kExprS128StoreMem: | 1191 case kExprS128StoreMem: |
| 1192 CHECK_PROTOTYPE_OPCODE(wasm_simd_prototype); |
1191 len = DecodeStoreMem(kWasmS128, MachineType::Simd128()); | 1193 len = DecodeStoreMem(kWasmS128, MachineType::Simd128()); |
1192 break; | 1194 break; |
1193 case kExprGrowMemory: { | 1195 case kExprGrowMemory: { |
1194 if (!CheckHasMemory()) break; | 1196 if (!CheckHasMemory()) break; |
1195 MemoryIndexOperand operand(this, pc_); | 1197 MemoryIndexOperand operand(this, pc_); |
1196 DCHECK_NOT_NULL(module_); | 1198 DCHECK_NOT_NULL(module_); |
1197 if (module_->is_wasm()) { | 1199 if (module_->is_wasm()) { |
1198 Value val = Pop(0, kWasmI32); | 1200 Value val = Pop(0, kWasmI32); |
1199 Push(kWasmI32, BUILD(GrowMemory, val.node)); | 1201 Push(kWasmI32, BUILD(GrowMemory, val.node)); |
1200 } else { | 1202 } else { |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2167 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, | 2169 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, |
2168 const byte* start, const byte* end) { | 2170 const byte* start, const byte* end) { |
2169 Decoder decoder(start, end); | 2171 Decoder decoder(start, end); |
2170 return WasmDecoder::AnalyzeLoopAssignment(&decoder, start, | 2172 return WasmDecoder::AnalyzeLoopAssignment(&decoder, start, |
2171 static_cast<int>(num_locals), zone); | 2173 static_cast<int>(num_locals), zone); |
2172 } | 2174 } |
2173 | 2175 |
2174 } // namespace wasm | 2176 } // namespace wasm |
2175 } // namespace internal | 2177 } // namespace internal |
2176 } // namespace v8 | 2178 } // namespace v8 |
OLD | NEW |