@@ -3,8 +3,8 @@ pub(crate) mod stack_switching;
33
44use crate :: compiler:: Compiler ;
55use crate :: translate:: {
6- FuncTranslationStacks , GlobalConstValue , GlobalVariable , Heap , HeapData , StructFieldsVec ,
7- TableData , TableSize , TargetEnvironment ,
6+ FuncTranslationStacks , GlobalVariable , Heap , HeapData , StructFieldsVec , TableData , TableSize ,
7+ TargetEnvironment ,
88} ;
99use crate :: { BuiltinFunctionSignatures , TRAP_INTERNAL_ASSERT } ;
1010use cranelift_codegen:: cursor:: FuncCursor ;
@@ -25,11 +25,11 @@ use wasmparser::{FuncValidator, Operator, WasmFeatures, WasmModuleResources};
2525use wasmtime_core:: math:: f64_cvt_to_int_bounds;
2626use wasmtime_environ:: {
2727 BuiltinFunctionIndex , DataIndex , DefinedFuncIndex , ElemIndex , EngineOrModuleTypeIndex ,
28- FrameStateSlotBuilder , FrameValType , FuncIndex , FuncKey , GlobalIndex , IndexType , Memory ,
29- MemoryIndex , Module , ModuleInternedTypeIndex , ModuleTranslation , ModuleTypesBuilder , PtrSize ,
30- Table , TableIndex , TagIndex , TripleExt , Tunables , TypeConvert , TypeIndex , VMOffsets ,
31- WasmCompositeInnerType , WasmFuncType , WasmHeapTopType , WasmHeapType , WasmRefType , WasmResult ,
32- WasmValType ,
28+ FrameStateSlotBuilder , FrameValType , FuncIndex , FuncKey , GlobalConstValue , GlobalIndex ,
29+ IndexType , Memory , MemoryIndex , Module , ModuleInternedTypeIndex , ModuleTranslation ,
30+ ModuleTypesBuilder , PtrSize , Table , TableIndex , TagIndex , TripleExt , Tunables , TypeConvert ,
31+ TypeIndex , VMOffsets , WasmCompositeInnerType , WasmFuncType , WasmHeapTopType , WasmHeapType ,
32+ WasmRefType , WasmResult , WasmValType ,
3333} ;
3434use wasmtime_environ:: { FUNCREF_INIT_BIT , FUNCREF_MASK } ;
3535
@@ -1429,7 +1429,7 @@ impl FuncEnvironment<'_> {
14291429 if !self . module . globals [ index] . mutability {
14301430 if let Some ( index) = self . module . defined_global_index ( index) {
14311431 let init = & self . module . global_initializers [ index] ;
1432- if let Some ( value) = GlobalConstValue :: const_eval ( init ) {
1432+ if let Some ( value) = init . const_eval ( ) {
14331433 return GlobalVariable :: Constant { value } ;
14341434 }
14351435 }
0 commit comments