summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/code-assembler.h
diff options
context:
space:
mode:
authorUjjwal Sharma <usharma1998@gmail.com>2019-03-15 18:35:06 +0530
committerRefael Ackermann <refack@gmail.com>2019-03-28 16:36:18 -0400
commitf579e1194046c50f2e6bb54348d48c8e7d1a53cf (patch)
tree9125787c758358365f74f9fd9673c14f57e67870 /deps/v8/src/compiler/code-assembler.h
parent2c73868b0471fbd4038f500d076df056cbf697fe (diff)
downloadnode-new-f579e1194046c50f2e6bb54348d48c8e7d1a53cf.tar.gz
deps: update V8 to 7.4.288.13
PR-URL: https://github.com/nodejs/node/pull/26685 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'deps/v8/src/compiler/code-assembler.h')
-rw-r--r--deps/v8/src/compiler/code-assembler.h54
1 files changed, 47 insertions, 7 deletions
diff --git a/deps/v8/src/compiler/code-assembler.h b/deps/v8/src/compiler/code-assembler.h
index 4f63ea3198..5d5cb5e00d 100644
--- a/deps/v8/src/compiler/code-assembler.h
+++ b/deps/v8/src/compiler/code-assembler.h
@@ -22,6 +22,7 @@
#include "src/objects/data-handler.h"
#include "src/objects/heap-number.h"
#include "src/objects/js-array-buffer.h"
+#include "src/objects/js-collection.h"
#include "src/objects/map.h"
#include "src/objects/maybe-object.h"
#include "src/objects/oddball.h"
@@ -40,6 +41,7 @@ class BigInt;
class CallInterfaceDescriptor;
class Callable;
class Factory;
+class FinalizationGroupCleanupJobTask;
class InterpreterData;
class Isolate;
class JSAsyncFunctionObject;
@@ -56,10 +58,9 @@ class JSRelativeTimeFormat;
class JSSegmentIterator;
class JSSegmenter;
class JSV8BreakIterator;
-class JSWeakCell;
class JSWeakCollection;
-class JSWeakFactory;
-class JSWeakFactoryCleanupIterator;
+class JSFinalizationGroup;
+class JSFinalizationGroupCleanupIterator;
class JSWeakMap;
class JSWeakRef;
class JSWeakSet;
@@ -70,7 +71,7 @@ class PromiseReaction;
class PromiseReactionJobTask;
class PromiseRejectReactionJobTask;
class WasmDebugInfo;
-class WeakFactoryCleanupJobTask;
+class WeakCell;
class Zone;
template <typename T>
@@ -272,6 +273,16 @@ enum class ObjectType {
#undef ENUM_ELEMENT
#undef ENUM_STRUCT_ELEMENT
+enum class CheckBounds { kAlways, kDebugOnly };
+inline bool NeedsBoundsCheck(CheckBounds check_bounds) {
+ switch (check_bounds) {
+ case CheckBounds::kAlways:
+ return true;
+ case CheckBounds::kDebugOnly:
+ return DEBUG_BOOL;
+ }
+}
+
class AccessCheckNeeded;
class BigIntWrapper;
class ClassBoilerplate;
@@ -917,6 +928,13 @@ class V8_EXPORT_PRIVATE CodeAssembler {
Node* Load(MachineType rep, Node* base, Node* offset,
LoadSensitivity needs_poisoning = LoadSensitivity::kSafe);
Node* AtomicLoad(MachineType rep, Node* base, Node* offset);
+ // Load uncompressed tagged value from (most likely off JS heap) memory
+ // location.
+ Node* LoadFullTagged(
+ Node* base, LoadSensitivity needs_poisoning = LoadSensitivity::kSafe);
+ Node* LoadFullTagged(
+ Node* base, Node* offset,
+ LoadSensitivity needs_poisoning = LoadSensitivity::kSafe);
// Load a value from the root array.
TNode<Object> LoadRoot(RootIndex root_index);
@@ -927,6 +945,12 @@ class V8_EXPORT_PRIVATE CodeAssembler {
Node* StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* value);
Node* StoreNoWriteBarrier(MachineRepresentation rep, Node* base, Node* offset,
Node* value);
+ // Stores uncompressed tagged value to (most likely off JS heap) memory
+ // location without write barrier.
+ Node* StoreFullTaggedNoWriteBarrier(Node* base, Node* tagged_value);
+ Node* StoreFullTaggedNoWriteBarrier(Node* base, Node* offset,
+ Node* tagged_value);
+
// Optimized memory operations that map to Turbofan simplified nodes.
TNode<HeapObject> OptimizedAllocate(TNode<IntPtrT> size,
PretenureFlag pretenure);
@@ -1066,6 +1090,12 @@ class V8_EXPORT_PRIVATE CodeAssembler {
return Unsigned(
IntPtrSub(static_cast<Node*>(left), static_cast<Node*>(right)));
}
+ TNode<RawPtrT> RawPtrAdd(TNode<RawPtrT> left, TNode<IntPtrT> right) {
+ return ReinterpretCast<RawPtrT>(IntPtrAdd(left, right));
+ }
+ TNode<RawPtrT> RawPtrAdd(TNode<IntPtrT> left, TNode<RawPtrT> right) {
+ return ReinterpretCast<RawPtrT>(IntPtrAdd(left, right));
+ }
TNode<WordT> WordShl(SloppyTNode<WordT> value, int shift);
TNode<WordT> WordShr(SloppyTNode<WordT> value, int shift);
@@ -1275,16 +1305,22 @@ class V8_EXPORT_PRIVATE CodeAssembler {
}
template <class... TArgs>
- Node* ConstructJS(Callable const& callable, Node* context, Node* new_target,
- TArgs... args) {
+ Node* ConstructJSWithTarget(Callable const& callable, Node* context,
+ Node* target, Node* new_target, TArgs... args) {
int argc = static_cast<int>(sizeof...(args));
Node* arity = Int32Constant(argc);
Node* receiver = LoadRoot(RootIndex::kUndefinedValue);
// Construct(target, new_target, arity, receiver, arguments...)
- return CallStub(callable, context, new_target, new_target, arity, receiver,
+ return CallStub(callable, context, target, new_target, arity, receiver,
args...);
}
+ template <class... TArgs>
+ Node* ConstructJS(Callable const& callable, Node* context, Node* new_target,
+ TArgs... args) {
+ return ConstructJSWithTarget(callable, context, new_target, new_target,
+ args...);
+ }
Node* CallCFunctionN(Signature<MachineType>* signature, int input_count,
Node* const* inputs);
@@ -1553,6 +1589,10 @@ class CodeAssemblerLabel {
std::map<CodeAssemblerVariable::Impl*, std::vector<Node*>,
CodeAssemblerVariable::ImplComparator>
variable_merges_;
+
+ // Cannot be copied because the destructor explicitly call the destructor of
+ // the underlying {RawMachineLabel}, hence only one pointer can point to it.
+ DISALLOW_COPY_AND_ASSIGN(CodeAssemblerLabel);
};
class CodeAssemblerParameterizedLabelBase {