diff options
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r-- | src/wasm-stack.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h index ae453f9de..fc38d07a4 100644 --- a/src/wasm-stack.h +++ b/src/wasm-stack.h @@ -146,13 +146,14 @@ private: // type => number of locals of that type in the compact form std::unordered_map<Type, size_t> numLocalsByType; - void noteLocalType(Type type); + void noteLocalType(Type type, Index count = 1); // Keeps track of the binary index of the scratch locals used to lower - // tuple.extract. + // tuple.extract. If there are multiple scratch locals of the same type, they + // are contiguous and this map holds the index of the first. InsertOrderedMap<Type, Index> scratchLocals; - void countScratchLocals(); - void setScratchLocals(); + // Return the type and number of required scratch locals. + InsertOrderedMap<Type, Index> countScratchLocals(); // local.get, local.tee, and glboal.get expressions that will be followed by // tuple.extracts. We can optimize these by getting only the local for the |