pytorch/torch/csrc/jit/script
Elias Ellison 59f8e8ada7 First step at adding exceptions (#12789)
Summary:
This is a first step towards adding exceptions. We need minimal support in order to begin converting the torch library to weak script mode (which is the main goal here).

Some limitations (that are documented in the tests & compiler):
1. Cannot assign exceptions to variables
2. Any name after raise is being treated as a valid Exception
3. No control flow analysis yet. Below a will be undefined:

if True:
     a = 1
else:
     raise Exception("Hi")
return a
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12789

Differential Revision: D12848936

Pulled By: eellison

fbshipit-source-id: 1f60ceef2381040486123ec797e97d65b074862d
2018-10-30 20:25:50 -07:00
..
builtin_functions.cpp Support warnings.warn (#12964) 2018-10-24 16:48:02 -07:00
builtin_functions.h Introduce builtin script functions (#12141) 2018-09-28 10:55:08 -07:00
compiler.cpp First step at adding exceptions (#12789) 2018-10-30 20:25:50 -07:00
compiler.h Add Future to IValue (#12976) 2018-10-27 10:00:35 -07:00
error_report.h Allow __constant__ values in a ScriptModule to be used as attributes for builtin functions (#7017) 2018-04-27 17:44:17 -07:00
init.cpp Add support for tuple constants (#13086) 2018-10-30 09:01:17 -07:00
init.h [jit] Have ScriptModule inherit from Module (#5769) 2018-03-22 00:17:49 -04:00
jit_exception.h First step at adding exceptions (#12789) 2018-10-30 20:25:50 -07:00
lexer.cpp remove ATen/Error.h and ATen/core/Error.h (#12792) 2018-10-17 17:25:42 -07:00
lexer.h First step at adding exceptions (#12789) 2018-10-30 20:25:50 -07:00
module.cpp Change return type of Tensor::dtype() from ScalarType to TypeMeta (#12766) 2018-10-26 09:27:09 -07:00
module.h Enable cppcoreguidelines checks in clang-tidy (#12959) 2018-10-29 18:23:35 -07:00
parser.h First step at adding exceptions (#12789) 2018-10-30 20:25:50 -07:00
python_tree_views.cpp First step at adding exceptions (#12789) 2018-10-30 20:25:50 -07:00
python_tree_views.h Add workaround to fix include warnings in Python 2 builds. (#6716) 2018-04-24 12:30:19 -07:00
tree_views.h First step at adding exceptions (#12789) 2018-10-30 20:25:50 -07:00
tree.h Match parameter names and = default (#9737) 2018-07-30 14:10:00 -07:00