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

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

Issue 2302013002: Store the scope info in catch contexts (Closed)
Patch Set: 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..26cc989501e32b9c0604d8e466f7d96b872eb1fb 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -178,6 +178,31 @@ std::ostream& operator<<(std::ostream&, ContextAccess const&);
ContextAccess const& ContextAccessOf(Operator const*);
+// Defines the name and ScopeInfo for a new catch context.
+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_;
marja 2016/09/02 07:39:35 This is an uncommon way to do const, a more common
jochen (gone - plz use gerrit) 2016/09/02 08:27:15 Just copying what the other operators in this file
+ Handle<ScopeInfo> const scope_info_;
+};
+
+bool operator==(CreateCatchContextParameters const&,
+ CreateCatchContextParameters const&);
+bool operator!=(CreateCatchContextParameters const&,
+ CreateCatchContextParameters const&);
+
+size_t hash_value(CreateCatchContextParameters const&);
+
+std::ostream& operator<<(std::ostream&, CreateCatchContextParameters const&);
marja 2016/09/02 07:39:35 What's up with this style?
jochen (gone - plz use gerrit) 2016/09/02 08:27:15 you mean like missing parameter names?
marja 2016/09/02 09:34:54 No, I meant CreateCatchContextParameters const& in
+
+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 +506,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