diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-03-07 08:54:53 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-03-07 16:48:52 +0100 |
commit | 88786fecff336342a56e6f2e7ff3b286be716e47 (patch) | |
tree | 92e6ba5b8ac8dae1a058988d20c9d27bfa654390 /deps/v8/src/compiler/js-operator.h | |
parent | 4e86f9b5ab83cbabf43839385bf383e6a7ef7d19 (diff) | |
download | node-new-88786fecff336342a56e6f2e7ff3b286be716e47.tar.gz |
deps: update V8 to 6.5.254.31
PR-URL: https://github.com/nodejs/node/pull/18453
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/v8/src/compiler/js-operator.h')
-rw-r--r-- | deps/v8/src/compiler/js-operator.h | 48 |
1 files changed, 16 insertions, 32 deletions
diff --git a/deps/v8/src/compiler/js-operator.h b/deps/v8/src/compiler/js-operator.h index 94a9b1fdb6..3875234d5a 100644 --- a/deps/v8/src/compiler/js-operator.h +++ b/deps/v8/src/compiler/js-operator.h @@ -10,6 +10,7 @@ #include "src/handles.h" #include "src/runtime/runtime.h" #include "src/type-hints.h" +#include "src/vector-slot-pair.h" namespace v8 { namespace internal { @@ -18,7 +19,6 @@ class AllocationSite; class BoilerplateDescription; class ConstantElementsPair; class SharedFunctionInfo; -class FeedbackVector; namespace compiler { @@ -59,32 +59,6 @@ std::ostream& operator<<(std::ostream&, CallFrequency); CallFrequency CallFrequencyOf(Operator const* op) WARN_UNUSED_RESULT; -// Defines a pair of {FeedbackVector} and {FeedbackSlot}, which -// is used to access the type feedback for a certain {Node}. -class V8_EXPORT_PRIVATE VectorSlotPair { - public: - VectorSlotPair(); - VectorSlotPair(Handle<FeedbackVector> vector, FeedbackSlot slot) - : vector_(vector), slot_(slot) {} - - bool IsValid() const { return !vector_.is_null() && !slot_.IsInvalid(); } - - Handle<FeedbackVector> vector() const { return vector_; } - FeedbackSlot slot() const { return slot_; } - - int index() const; - - private: - const Handle<FeedbackVector> vector_; - const FeedbackSlot slot_; -}; - -bool operator==(VectorSlotPair const&, VectorSlotPair const&); -bool operator!=(VectorSlotPair const&, VectorSlotPair const&); - -size_t hash_value(VectorSlotPair const&); - - // Defines the flags for a JavaScript call forwarding parameters. This // is used as parameter by JSConstructForwardVarargs operators. class ConstructForwardVarargsParameters final { @@ -187,8 +161,10 @@ class CallParameters final { public: CallParameters(size_t arity, CallFrequency frequency, VectorSlotPair const& feedback, - ConvertReceiverMode convert_mode) + ConvertReceiverMode convert_mode, + SpeculationMode speculation_mode) : bit_field_(ArityField::encode(arity) | + SpeculationModeField::encode(speculation_mode) | ConvertReceiverModeField::encode(convert_mode)), frequency_(frequency), feedback_(feedback) {} @@ -200,6 +176,10 @@ class CallParameters final { } VectorSlotPair const& feedback() const { return feedback_; } + SpeculationMode speculation_mode() const { + return SpeculationModeField::decode(bit_field_); + } + bool operator==(CallParameters const& that) const { return this->bit_field_ == that.bit_field_ && this->frequency_ == that.frequency_ && @@ -212,7 +192,8 @@ class CallParameters final { return base::hash_combine(p.bit_field_, p.frequency_, p.feedback_); } - typedef BitField<size_t, 0, 29> ArityField; + typedef BitField<size_t, 0, 28> ArityField; + typedef BitField<SpeculationMode, 28, 1> SpeculationModeField; typedef BitField<ConvertReceiverMode, 29, 2> ConvertReceiverModeField; uint32_t const bit_field_; @@ -693,11 +674,13 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final const Operator* Call( size_t arity, CallFrequency frequency = CallFrequency(), VectorSlotPair const& feedback = VectorSlotPair(), - ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny); + ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, + SpeculationMode speculation_mode = SpeculationMode::kAllowSpeculation); const Operator* CallWithArrayLike(CallFrequency frequency); const Operator* CallWithSpread( uint32_t arity, CallFrequency frequency = CallFrequency(), - VectorSlotPair const& feedback = VectorSlotPair()); + VectorSlotPair const& feedback = VectorSlotPair(), + SpeculationMode speculation_mode = SpeculationMode::kAllowSpeculation); const Operator* CallRuntime(Runtime::FunctionId id); const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); const Operator* CallRuntime(const Runtime::Function* function, size_t arity); @@ -761,8 +744,9 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final // Used to implement Ignition's RestoreGeneratorState bytecode. const Operator* GeneratorRestoreContinuation(); - // Used to implement Ignition's RestoreGeneratorRegisters bytecode. + // Used to implement Ignition's ResumeGenerator bytecode. const Operator* GeneratorRestoreRegister(int index); + const Operator* GeneratorRestoreInputOrDebugPos(); const Operator* StackCheck(); const Operator* Debugger(); |