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

Unified Diff: src/compiler/effect-control-linearizer.cc

Issue 2279213002: [turbofan] Introduce a dedicated ArrayBufferWasNeutered operator. (Closed)
Patch Set: Created 4 years, 4 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/effect-control-linearizer.h ('k') | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/effect-control-linearizer.cc
diff --git a/src/compiler/effect-control-linearizer.cc b/src/compiler/effect-control-linearizer.cc
index 9cc6ddc4f90b8ace9cd70f24d216e2e28c1df5f5..ced942b05ce67042a4fc59baf2addf9c59284f61 100644
--- a/src/compiler/effect-control-linearizer.cc
+++ b/src/compiler/effect-control-linearizer.cc
@@ -702,6 +702,9 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node,
case IrOpcode::kObjectIsUndetectable:
state = LowerObjectIsUndetectable(node, *effect, *control);
break;
+ case IrOpcode::kArrayBufferWasNeutered:
+ state = LowerArrayBufferWasNeutered(node, *effect, *control);
+ break;
case IrOpcode::kStringFromCharCode:
state = LowerStringFromCharCode(node, *effect, *control);
break;
@@ -1996,6 +1999,26 @@ EffectControlLinearizer::LowerObjectIsUndetectable(Node* node, Node* effect,
}
EffectControlLinearizer::ValueEffectControl
+EffectControlLinearizer::LowerArrayBufferWasNeutered(Node* node, Node* effect,
+ Node* control) {
+ Node* value = node->InputAt(0);
+
+ Node* value_bit_field = effect = graph()->NewNode(
+ simplified()->LoadField(AccessBuilder::ForJSArrayBufferBitField()), value,
+ effect, control);
+ value = graph()->NewNode(
+ machine()->Word32Equal(),
+ graph()->NewNode(machine()->Word32Equal(),
+ graph()->NewNode(machine()->Word32And(), value_bit_field,
+ jsgraph()->Int32Constant(
+ JSArrayBuffer::WasNeutered::kMask)),
+ jsgraph()->Int32Constant(0)),
+ jsgraph()->Int32Constant(0));
+
+ return ValueEffectControl(value, effect, control);
+}
+
+EffectControlLinearizer::ValueEffectControl
EffectControlLinearizer::LowerStringCharCodeAt(Node* node, Node* effect,
Node* control) {
Node* subject = node->InputAt(0);
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/js-builtin-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698