Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: src/compiler/js-operator.h

Issue 2302013002: Store the scope info in catch contexts (Closed)
Patch Set: updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.h
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h
index cb46178ed3c409edb633a2367923a7510a8ba6fe..ecb0c0b22bf6c641ac81e14a721c567639f07b6a 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -178,6 +178,33 @@ std::ostream& operator<<(std::ostream&, ContextAccess const&);
ContextAccess const& ContextAccessOf(Operator const*);
+// Defines the name and ScopeInfo for a new catch context. This is used as a
+// parameter by the JSCreateCatchContext operator.
+class CreateCatchContextParameters final {
+ public:
+ CreateCatchContextParameters(Handle<String> catch_name,
+ Handle<ScopeInfo> scope_info);
+
+ Handle<String> catch_name() const { return catch_name_; }
+ Handle<ScopeInfo> scope_info() const { return scope_info_; }
+
+ private:
+ Handle<String> const catch_name_;
+ Handle<ScopeInfo> const scope_info_;
+};
+
+bool operator==(CreateCatchContextParameters const& lhs,
+ CreateCatchContextParameters const& rhs);
+bool operator!=(CreateCatchContextParameters const& lhs,
+ CreateCatchContextParameters const& rhs);
+
+size_t hash_value(CreateCatchContextParameters const& parameters);
+
+std::ostream& operator<<(std::ostream& os,
+ CreateCatchContextParameters const& parameters);
+
+CreateCatchContextParameters const& CreateCatchContextParametersOf(
+ Operator const*);
// Defines the property of an object for a named access. This is
// used as a parameter by the JSLoadNamed and JSStoreNamed operators.
@@ -481,7 +508,8 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* StackCheck();
const Operator* CreateFunctionContext(int slot_count);
- const Operator* CreateCatchContext(const Handle<String>& name);
+ const Operator* CreateCatchContext(const Handle<String>& name,
+ const Handle<ScopeInfo>& scope_info);
const Operator* CreateWithContext();
const Operator* CreateBlockContext(const Handle<ScopeInfo>& scpope_info);
const Operator* CreateModuleContext();
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698