@@ -35,7 +35,7 @@ class X86Generator : public WASMDecoder<X86Generator> {
35
35
m_a.asm_push_r32 (X86Reg::ebp);
36
36
m_a.asm_mov_r32_r32 (X86Reg::ebp, X86Reg::esp);
37
37
38
- // Initialze space for local variables to zero
38
+ // Initialze local variables to zero and thus allocate space
39
39
m_a.asm_mov_r32_imm32 (X86Reg::eax, 0U );
40
40
for (uint32_t j = 0 ; j < codes.p [i].locals .size (); j++) {
41
41
for (uint32_t k = 0 ; k < codes.p [i].locals .p [j].count ;
@@ -106,7 +106,9 @@ Result<int> wasm_to_x86(Vec<uint8_t> &wasm_bytes, Allocator &al,
106
106
auto t1 = std::chrono::high_resolution_clock::now ();
107
107
m_a.verify ();
108
108
auto t2 = std::chrono::high_resolution_clock::now ();
109
- time_verify = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count ();
109
+ time_verify =
110
+ std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1)
111
+ .count ();
110
112
}
111
113
112
114
{
@@ -124,9 +126,11 @@ Result<int> wasm_to_x86(Vec<uint8_t> &wasm_bytes, Allocator &al,
124
126
<< std::endl;
125
127
std::cout << " Generate asm: " << std::setw (5 ) << time_gen_x86_bytes
126
128
<< std::endl;
127
- std::cout << " Verify: " << std::setw (5 ) << time_verify << std::endl;
129
+ std::cout << " Verify: " << std::setw (5 ) << time_verify
130
+ << std::endl;
128
131
std::cout << " Save: " << std::setw (5 ) << time_save << std::endl;
129
- int total = time_decode_wasm + time_gen_x86_bytes + time_verify + time_save;
132
+ int total =
133
+ time_decode_wasm + time_gen_x86_bytes + time_verify + time_save;
130
134
std::cout << " Total: " << std::setw (5 ) << total << std::endl;
131
135
}
132
136
return 0 ;
0 commit comments