summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/graph-assembler.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2017-10-18 15:03:02 -0700
committerMichaël Zasso <targos@protonmail.com>2017-10-18 17:01:41 -0700
commit3d1b3df9486c0e7708065257f7311902f6b7b366 (patch)
treecb051bdeaead11e06dcd97725783e0f113afb1bf /deps/v8/src/compiler/graph-assembler.cc
parente2cddbb8ccdb7b3c4a40c8acc630f68703bc77b5 (diff)
downloadnode-new-3d1b3df9486c0e7708065257f7311902f6b7b366.tar.gz
deps: update V8 to 6.2.414.32
PR-URL: https://github.com/nodejs/node/pull/15362 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/compiler/graph-assembler.cc')
-rw-r--r--deps/v8/src/compiler/graph-assembler.cc84
1 files changed, 14 insertions, 70 deletions
diff --git a/deps/v8/src/compiler/graph-assembler.cc b/deps/v8/src/compiler/graph-assembler.cc
index a91b83a035..041b2eefd2 100644
--- a/deps/v8/src/compiler/graph-assembler.cc
+++ b/deps/v8/src/compiler/graph-assembler.cc
@@ -130,6 +130,11 @@ Node* GraphAssembler::StoreElement(ElementAccess const& access, Node* object,
value, current_effect_, current_control_);
}
+Node* GraphAssembler::DebugBreak() {
+ return current_effect_ = graph()->NewNode(machine()->DebugBreak(),
+ current_effect_, current_control_);
+}
+
Node* GraphAssembler::Store(StoreRepresentation rep, Node* object, Node* offset,
Node* value) {
return current_effect_ =
@@ -167,23 +172,22 @@ Node* GraphAssembler::DeoptimizeIf(DeoptimizeReason reason, Node* condition,
frame_state, current_effect_, current_control_);
}
-Node* GraphAssembler::DeoptimizeUnless(DeoptimizeKind kind,
- DeoptimizeReason reason, Node* condition,
- Node* frame_state) {
+Node* GraphAssembler::DeoptimizeIfNot(DeoptimizeKind kind,
+ DeoptimizeReason reason, Node* condition,
+ Node* frame_state) {
return current_control_ = current_effect_ = graph()->NewNode(
common()->DeoptimizeUnless(kind, reason), condition, frame_state,
current_effect_, current_control_);
}
-Node* GraphAssembler::DeoptimizeUnless(DeoptimizeReason reason, Node* condition,
- Node* frame_state) {
- return DeoptimizeUnless(DeoptimizeKind::kEager, reason, condition,
- frame_state);
+Node* GraphAssembler::DeoptimizeIfNot(DeoptimizeReason reason, Node* condition,
+ Node* frame_state) {
+ return DeoptimizeIfNot(DeoptimizeKind::kEager, reason, condition,
+ frame_state);
}
-void GraphAssembler::Branch(Node* condition,
- GraphAssemblerStaticLabel<1>* if_true,
- GraphAssemblerStaticLabel<1>* if_false) {
+void GraphAssembler::Branch(Node* condition, GraphAssemblerLabel<0u>* if_true,
+ GraphAssemblerLabel<0u>* if_false) {
DCHECK_NOT_NULL(current_control_);
BranchHint hint = BranchHint::kNone;
@@ -235,66 +239,6 @@ Operator const* GraphAssembler::ToNumberOperator() {
return to_number_operator_.get();
}
-Node* GraphAssemblerLabel::PhiAt(size_t index) {
- DCHECK(IsBound());
- return GetBindingsPtrFor(index)[0];
-}
-
-GraphAssemblerLabel::GraphAssemblerLabel(GraphAssemblerLabelType is_deferred,
- size_t merge_count, size_t var_count,
- MachineRepresentation* representations,
- Zone* zone)
- : is_deferred_(is_deferred == GraphAssemblerLabelType::kDeferred),
- max_merge_count_(merge_count),
- var_count_(var_count) {
- effects_ = zone->NewArray<Node*>(MaxMergeCount() + 1);
- for (size_t i = 0; i < MaxMergeCount() + 1; i++) {
- effects_[i] = nullptr;
- }
-
- controls_ = zone->NewArray<Node*>(MaxMergeCount());
- for (size_t i = 0; i < MaxMergeCount(); i++) {
- controls_[i] = nullptr;
- }
-
- size_t num_bindings = (MaxMergeCount() + 1) * PhiCount() + 1;
- bindings_ = zone->NewArray<Node*>(num_bindings);
- for (size_t i = 0; i < num_bindings; i++) {
- bindings_[i] = nullptr;
- }
-
- representations_ = zone->NewArray<MachineRepresentation>(PhiCount() + 1);
- for (size_t i = 0; i < PhiCount(); i++) {
- representations_[i] = representations[i];
- }
-}
-
-GraphAssemblerLabel::~GraphAssemblerLabel() {
- DCHECK(IsBound() || MergedCount() == 0);
-}
-
-Node** GraphAssemblerLabel::GetBindingsPtrFor(size_t phi_index) {
- DCHECK_LT(phi_index, PhiCount());
- return &bindings_[phi_index * (MaxMergeCount() + 1)];
-}
-
-void GraphAssemblerLabel::SetBinding(size_t phi_index, size_t merge_index,
- Node* binding) {
- DCHECK_LT(phi_index, PhiCount());
- DCHECK_LT(merge_index, MaxMergeCount());
- bindings_[phi_index * (MaxMergeCount() + 1) + merge_index] = binding;
-}
-
-MachineRepresentation GraphAssemblerLabel::GetRepresentationFor(
- size_t phi_index) {
- DCHECK_LT(phi_index, PhiCount());
- return representations_[phi_index];
-}
-
-Node** GraphAssemblerLabel::GetControlsPtr() { return controls_; }
-
-Node** GraphAssemblerLabel::GetEffectsPtr() { return effects_; }
-
} // namespace compiler
} // namespace internal
} // namespace v8