%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
// Copyright 2021 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/wasm/wasm-init-expr.h" #include "src/wasm/wasm-features.h" #include "src/wasm/wasm-module.h" namespace v8 { namespace internal { namespace wasm { ValueType WasmInitExpr::type(const WasmModule* module, const WasmFeatures& enabled_features) const { switch (kind()) { case kNone: return kWasmBottom; case kGlobalGet: return immediate().index < module->globals.size() ? module->globals[immediate().index].type : kWasmBottom; case kI32Const: return kWasmI32; case kI64Const: return kWasmI64; case kF32Const: return kWasmF32; case kF64Const: return kWasmF64; case kS128Const: return kWasmS128; case kRefFuncConst: { uint32_t heap_type = enabled_features.has_typed_funcref() ? module->functions[immediate().index].sig_index : HeapType::kFunc; return ValueType::Ref(heap_type, kNonNullable); } case kRefNullConst: return ValueType::Ref(immediate().heap_type, kNullable); case kStructNewWithRtt: case kArrayInit: return ValueType::Ref(immediate().index, kNonNullable); case kRttCanon: return ValueType::Rtt(immediate().heap_type, 0); case kRttSub: case kRttFreshSub: { ValueType operand_type = operands()[0].type(module, enabled_features); if (!operand_type.is_rtt()) return kWasmBottom; if (operand_type.has_depth()) { return ValueType::Rtt(immediate().heap_type, operand_type.depth() + 1); } else { return ValueType::Rtt(immediate().heap_type); } } } } } // namespace wasm } // namespace internal } // namespace v8