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

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

Issue 1105513002: [turbofan] Use FastNewClosureStub if possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 8 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 0b6ec9c0bdd653ef332c1339b00cf6e66ea93f77..bdb0c9c7d4411912e8ca2e0e3721223ccd66ed48 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -206,6 +206,32 @@ std::ostream& operator<<(std::ostream&, StoreNamedParameters const&);
const StoreNamedParameters& StoreNamedParametersOf(const Operator* op);
+// Defines shared information for the closure that should be created. This is
+// used as a parameter by JSCreateClosure operators.
+class CreateClosureParameters final {
+ public:
+ CreateClosureParameters(Handle<SharedFunctionInfo> shared_info,
+ PretenureFlag pretenure)
+ : shared_info_(shared_info), pretenure_(pretenure) {}
+
+ Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
+ PretenureFlag pretenure() const { return pretenure_; }
+
+ private:
+ const Handle<SharedFunctionInfo> shared_info_;
+ const PretenureFlag pretenure_;
+};
+
+bool operator==(CreateClosureParameters const&, CreateClosureParameters const&);
+bool operator!=(CreateClosureParameters const&, CreateClosureParameters const&);
+
+size_t hash_value(CreateClosureParameters const&);
+
+std::ostream& operator<<(std::ostream&, CreateClosureParameters const&);
+
+const CreateClosureParameters& CreateClosureParametersOf(const Operator* op);
+
+
// Interface for building JavaScript-level operators, e.g. directly from the
// AST. Most operators have no parameters, thus can be globally shared for all
// graphs.
@@ -242,6 +268,8 @@ class JSOperatorBuilder final : public ZoneObject {
const Operator* Yield();
const Operator* Create();
+ const Operator* CreateClosure(Handle<SharedFunctionInfo> shared_info,
+ PretenureFlag pretenure);
const Operator* CallFunction(size_t arity, CallFunctionFlags flags);
const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);
« 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