Chromium Code Reviews| Index: src/wasm/ast-decoder.cc |
| diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc |
| index 025ccdf1d7bfc0d2c159e511600b0d313cf0fa9b..b47ab82ec122fc46d092eecc96e6fdb6db9ccf6e 100644 |
| --- a/src/wasm/ast-decoder.cc |
| +++ b/src/wasm/ast-decoder.cc |
| @@ -685,7 +685,7 @@ class WasmFullDecoder : public WasmDecoder { |
| SsaEnv* finish_try_env = Steal(ssa_env_); |
| // The continue environment is the inner environment. |
| PrepareForLoop(pc_, finish_try_env); |
|
titzer
2016/10/11 18:44:33
Can we make PrepareForLoop() return a new environm
ahaas
2016/10/12 18:03:58
Done.
|
| - SetEnv("loop:start", Split(finish_try_env)); |
| + SetEnv("loop:start", SetLoopStackCheck(Split(finish_try_env))); |
| ssa_env_->SetNotMerged(); |
| PushLoop(finish_try_env); |
| SetBlockType(&control_.back(), operand); |
| @@ -1639,6 +1639,11 @@ class WasmFullDecoder : public WasmDecoder { |
| } |
| } |
| + SsaEnv* SetLoopStackCheck(SsaEnv* env) { |
| + builder_->StackCheck(position(), &(env->effect), &(env->control)); |
| + return env; |
| + } |
| + |
| // Create a complete copy of the {from}. |
| SsaEnv* Split(SsaEnv* from) { |
| DCHECK_NOT_NULL(from); |