diff options
author | Ben Smith <binjimin@gmail.com> | 2018-10-01 17:50:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-01 17:50:46 -0700 |
commit | c90dc3ed9787a0c671d4efff407911fd3003f786 (patch) | |
tree | 3abe9e95fe77f8d78642a3a12c6c18136fb8ce27 /src/validator.cc | |
parent | 48531e30895d47ae4f881dc18e41e4eb187b776a (diff) | |
download | wabt-c90dc3ed9787a0c671d4efff407911fd3003f786.tar.gz wabt-c90dc3ed9787a0c671d4efff407911fd3003f786.tar.bz2 wabt-c90dc3ed9787a0c671d4efff407911fd3003f786.zip |
Tailcall (#918)
This doesn't do any of the real work yet, it just adds the
ReturnCall/ReturnCallIndirect Expr and Opcode types, and the
"--enable-tail-call" flag.
Still TODO:
* Parse the opcodes in binary-reader.cc
* Validate the opcodes in validator.cc and type-checker.cc
* Implement the opcodes in interp.cc
* Write standard wabt tests, and enable the spec proposal tests too
Diffstat (limited to 'src/validator.cc')
-rw-r--r-- | src/validator.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/validator.cc b/src/validator.cc index 27bf2422..fc255b43 100644 --- a/src/validator.cc +++ b/src/validator.cc @@ -70,6 +70,8 @@ class Validator : public ExprVisitor::Delegate { Result OnMemorySizeExpr(MemorySizeExpr*) override; Result OnNopExpr(NopExpr*) override; Result OnReturnExpr(ReturnExpr*) override; + Result OnReturnCallExpr(ReturnCallExpr*) override; + Result OnReturnCallIndirectExpr(ReturnCallIndirectExpr*) override; Result OnSelectExpr(SelectExpr*) override; Result OnSetGlobalExpr(SetGlobalExpr*) override; Result OnSetLocalExpr(SetLocalExpr*) override; @@ -708,6 +710,16 @@ Result Validator::OnReturnExpr(ReturnExpr* expr) { return Result::Ok; } +Result Validator::OnReturnCallExpr(ReturnCallExpr* expr) { + // TODO(binji): implement. + return Result::Error; +} + +Result Validator::OnReturnCallIndirectExpr(ReturnCallIndirectExpr* expr) { + // TODO(binji): implement. + return Result::Error; +} + Result Validator::OnSelectExpr(SelectExpr* expr) { expr_loc_ = &expr->loc; typechecker_.OnSelect(); |