prepack/test/error-handler
Nikolai Tillmann 6b34650aed Fixing handling of stack overflows. (#2553)
Summary:
Release notes: User-level stack overflows no longer crash Prepack.

This fixes #2552, and actually a bit more:
- We used to piggy-back on `pushContext` to count stack frames. However, there is no one-to-one correspondance of calls and context, so that wasn't a very good proxy. (In fact, there seem to be calls that don't push a context.) So we now count calls and constructs explicitly.
- Instead of just throwing a `FatalError` when the stack space is exceeded, which in turn causes an invariant violation since there must not be a `FatalError` thrown without a compiler diagnostics having beein issue. Now there is a regular error code PP0045.

Added error handler regression test.
Pull Request resolved: https://github.com/facebook/prepack/pull/2553

Differential Revision: D9889090

Pulled By: NTillmann

fbshipit-source-id: f6f863ee9ef73f258692f215ef75b63b737f5394
2018-09-17 18:55:30 -07:00
..
.write-write-conflict.js.swp Make optimized functions produce compiler diagnostic on mutating non-… (#2175) 2018-07-10 12:10:41 -07:00
abstract-value-check-dup-name-string.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
bad-functions.js Add basic support for throws in React (#2502) 2018-08-29 18:37:03 -07:00
binaryExpression.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
call2.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
call.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
class.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
conditional-return.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
EmptyBuiltInArrayCycle.js Enable and constrain optimized array operator support for InstantRender (#2547) 2018-09-17 14:55:58 -07:00
EmptyBuiltInPropsCycle.js Enable and constrain optimized array operator support for InstantRender (#2547) 2018-09-17 14:55:58 -07:00
FinalObjectCannotBeMutated.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
forInStatement.js Move away from object templates, part 5 2017-09-12 09:01:07 -07:00
forOfStatement.js Move away from object templates, part 1 2017-08-21 19:52:39 -07:00
in1.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
in2.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
instanceof.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
InstantRenderArrayOps3.js Enable and constrain optimized array operator support for InstantRender (#2547) 2018-09-17 14:55:58 -07:00
InstantRenderArrayOps4.js Enable and constrain optimized array operator support for InstantRender (#2547) 2018-09-17 14:55:58 -07:00
member2.js Provide for intrinsic abstract arrays 2017-12-23 11:09:17 -08:00
member.js Provide for intrinsic abstract arrays 2017-12-23 11:09:17 -08:00
ModifiedObjectPropertyLimitation.js Add basic support for throws in React (#2502) 2018-08-29 18:37:03 -07:00
object-assign.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
objectExpression2.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
objectExpression.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
objectpattern.js Error message for unknown name in object pattern 2017-07-13 12:25:56 -07:00
PropertyAttributeConflict.js Refactor assignment on partial or possibly deleted property (#2389) 2018-08-10 13:24:35 -07:00
Set.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
stackOverflow.js Fixing handling of stack overflows. (#2553) 2018-09-17 18:55:30 -07:00
syntaxError.js fix #1239 - Command-line based syntax errors now print location 2017-12-18 13:56:26 -08:00
testErrorHandlerCalled.js Error for in with abstract 2017-06-19 18:38:44 -07:00
try-and-access-abstract-property.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
try-and-call-abstract-function.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
unaryExpression.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
updateExpression.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
with2.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
with.js Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
write-forin-conflict.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00
write-in-conflict.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00
write-reflect-conflict.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00
write-write-conflict2.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00
write-write-conflict3.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00
write-write-conflict4.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00
write-write-conflict.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00
write-write-unknown-prop-conflict.js A few issues I found while being a Prepack user on InstantRender. (#2352) 2018-08-02 12:39:02 -07:00