diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-12-04 08:20:37 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-12-06 15:23:33 +0100 |
commit | 9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch) | |
tree | 2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/src/compiler/js-native-context-specialization.h | |
parent | b8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff) | |
download | node-new-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz |
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/src/compiler/js-native-context-specialization.h')
-rw-r--r-- | deps/v8/src/compiler/js-native-context-specialization.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/deps/v8/src/compiler/js-native-context-specialization.h b/deps/v8/src/compiler/js-native-context-specialization.h index 413e3c191f..0bd62e07c9 100644 --- a/deps/v8/src/compiler/js-native-context-specialization.h +++ b/deps/v8/src/compiler/js-native-context-specialization.h @@ -16,6 +16,9 @@ namespace internal { // Forward declarations. class Factory; class FeedbackNexus; +class JSGlobalObject; +class JSGlobalProxy; +class StringConstantBase; namespace compiler { @@ -36,7 +39,8 @@ class TypeCache; // folding some {LoadGlobal} nodes or strength reducing some {StoreGlobal} // nodes. And also specializes {LoadNamed} and {StoreNamed} nodes according // to type feedback (if available). -class JSNativeContextSpecialization final : public AdvancedReducer { +class V8_EXPORT_PRIVATE JSNativeContextSpecialization final + : public AdvancedReducer { public: // Flags that control the mode of operation. enum Flag { @@ -50,7 +54,7 @@ class JSNativeContextSpecialization final : public AdvancedReducer { JSHeapBroker* js_heap_broker, Flags flags, Handle<Context> native_context, CompilationDependencies* dependencies, - Zone* zone); + Zone* zone, Zone* shared_zone); const char* reducer_name() const override { return "JSNativeContextSpecialization"; @@ -58,6 +62,12 @@ class JSNativeContextSpecialization final : public AdvancedReducer { Reduction Reduce(Node* node) final; + // Utility for folding string constant concatenation. + // Supports JSAdd nodes and nodes typed as string or number. + // Public for the sake of unit testing. + static base::Optional<size_t> GetMaxStringLength(JSHeapBroker* broker, + Node* node); + private: Reduction ReduceJSAdd(Node* node); Reduction ReduceJSGetSuperConstructor(Node* node); @@ -101,6 +111,9 @@ class JSNativeContextSpecialization final : public AdvancedReducer { Node* index = nullptr); Reduction ReduceSoftDeoptimize(Node* node, DeoptimizeReason reason); + Reduction ReduceJSToString(Node* node); + + const StringConstantBase* CreateDelayedStringConstant(Node* node); // A triple of nodes that represents a continuation. class ValueEffectControl final { @@ -230,6 +243,7 @@ class JSNativeContextSpecialization final : public AdvancedReducer { const NativeContextRef& native_context() const { return native_context_; } CompilationDependencies* dependencies() const { return dependencies_; } Zone* zone() const { return zone_; } + Zone* shared_zone() const { return shared_zone_; } JSGraph* const jsgraph_; JSHeapBroker* const js_heap_broker_; @@ -239,6 +253,7 @@ class JSNativeContextSpecialization final : public AdvancedReducer { NativeContextRef native_context_; CompilationDependencies* const dependencies_; Zone* const zone_; + Zone* const shared_zone_; TypeCache const& type_cache_; DISALLOW_COPY_AND_ASSIGN(JSNativeContextSpecialization); |