Revert "Revert "Upgrade to 5.0.71.48"" DO NOT MERGE
This reverts commit f2e3994fa5148cc3d9946666f0b0596290192b0e,
and updates the x64 makefile properly so it doesn't break that
build.
FPIIM-449
Change-Id: Ib83e35bfbae6af627451c926a9650ec57c045605
(cherry picked from commit 109988c7ccb6f3fd1a58574fa3dfb88beaef6632)
diff --git a/src/interpreter/control-flow-builders.h b/src/interpreter/control-flow-builders.h
index 24a7dfe..e4d376b 100644
--- a/src/interpreter/control-flow-builders.h
+++ b/src/interpreter/control-flow-builders.h
@@ -144,6 +144,53 @@
ZoneVector<BytecodeLabel> case_sites_;
};
+
+// A class to help with co-ordinating control flow in try-catch statements.
+class TryCatchBuilder final : public ControlFlowBuilder {
+ public:
+ explicit TryCatchBuilder(BytecodeArrayBuilder* builder)
+ : ControlFlowBuilder(builder), handler_id_(builder->NewHandlerEntry()) {}
+
+ void BeginTry(Register context);
+ void EndTry();
+ void EndCatch();
+
+ private:
+ int handler_id_;
+ BytecodeLabel handler_;
+ BytecodeLabel exit_;
+};
+
+
+// A class to help with co-ordinating control flow in try-finally statements.
+class TryFinallyBuilder final : public ControlFlowBuilder {
+ public:
+ explicit TryFinallyBuilder(BytecodeArrayBuilder* builder, bool will_catch)
+ : ControlFlowBuilder(builder),
+ handler_id_(builder->NewHandlerEntry()),
+ finalization_sites_(builder->zone()),
+ will_catch_(will_catch) {}
+
+ void BeginTry(Register context);
+ void LeaveTry();
+ void EndTry();
+ void BeginHandler();
+ void BeginFinally();
+ void EndFinally();
+
+ private:
+ int handler_id_;
+ BytecodeLabel handler_;
+
+ // Unbound labels that identify jumps to the finally block in the code.
+ ZoneVector<BytecodeLabel> finalization_sites_;
+
+ // Conservative prediction of whether exceptions thrown into the handler for
+ // this finally block will be caught. Note that such a prediction depends on
+ // whether this try-finally is nested inside a surrounding try-catch.
+ bool will_catch_;
+};
+
} // namespace interpreter
} // namespace internal
} // namespace v8