00e4ba52ea
Throw and rethrow are implemented as CPS expressions in tail position. The CPS translation assumes that all expressions translate to a primitive that is the value of the expression, and throw is an expression in Dart. For simplicity of the translation, a non-tail throw Primitive is sometimes used as a placeholder during the translation and removed immediately afterward. Both throw and rethrow are represented in the Tree IR. In the Dart backend, throw translates to throw and rethrow translates to rethrow. In the JS backend, throw translates to JS throw of a wrapped value. Rethrow is not currently implemented for the JS backend, it bails out of the compiler. R=asgerf@google.com BUG= Review URL: https://codereview.chromium.org//1092023002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45235 260f80e4-7a28-3924-810f-c04153c831b5