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

Unified Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1452113002: [turbofan] Do not lower (One|Two)ByteSeqString(Get|Set)Char intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index 0779dd780ba3b230a52cefa9d95cbe71ab7e720d..8620429334535104448cd4721c8fc3468ee1122f 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -74,16 +74,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceMathFloor(node);
case Runtime::kInlineMathSqrt:
return ReduceMathSqrt(node);
- case Runtime::kInlineOneByteSeqStringGetChar:
- return ReduceSeqStringGetChar(node, String::ONE_BYTE_ENCODING);
- case Runtime::kInlineOneByteSeqStringSetChar:
- return ReduceSeqStringSetChar(node, String::ONE_BYTE_ENCODING);
case Runtime::kInlineStringGetLength:
return ReduceStringGetLength(node);
- case Runtime::kInlineTwoByteSeqStringGetChar:
- return ReduceSeqStringGetChar(node, String::TWO_BYTE_ENCODING);
- case Runtime::kInlineTwoByteSeqStringSetChar:
- return ReduceSeqStringSetChar(node, String::TWO_BYTE_ENCODING);
case Runtime::kInlineValueOf:
return ReduceValueOf(node);
case Runtime::kInlineIsMinusZero:
@@ -336,44 +328,6 @@ Reduction JSIntrinsicLowering::ReduceMathSqrt(Node* node) {
}
-Reduction JSIntrinsicLowering::ReduceSeqStringGetChar(
- Node* node, String::Encoding encoding) {
- Node* effect = NodeProperties::GetEffectInput(node);
- Node* control = NodeProperties::GetControlInput(node);
- RelaxControls(node);
- node->ReplaceInput(2, effect);
- node->ReplaceInput(3, control);
- node->TrimInputCount(4);
- NodeProperties::ChangeOp(
- node,
- simplified()->LoadElement(AccessBuilder::ForSeqStringChar(encoding)));
- return Changed(node);
-}
-
-
-Reduction JSIntrinsicLowering::ReduceSeqStringSetChar(
- Node* node, String::Encoding encoding) {
- // Note: The intrinsic has a strange argument order, so we need to reshuffle.
- Node* index = NodeProperties::GetValueInput(node, 0);
- Node* chr = NodeProperties::GetValueInput(node, 1);
- Node* string = NodeProperties::GetValueInput(node, 2);
- Node* effect = NodeProperties::GetEffectInput(node);
- Node* control = NodeProperties::GetControlInput(node);
- ReplaceWithValue(node, string, node);
- NodeProperties::RemoveType(node);
- node->ReplaceInput(0, string);
- node->ReplaceInput(1, index);
- node->ReplaceInput(2, chr);
- node->ReplaceInput(3, effect);
- node->ReplaceInput(4, control);
- node->TrimInputCount(5);
- NodeProperties::ChangeOp(
- node,
- simplified()->StoreElement(AccessBuilder::ForSeqStringChar(encoding)));
- return Changed(node);
-}
-
-
Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) {
Node* value = NodeProperties::GetValueInput(node, 0);
Node* effect = NodeProperties::GetEffectInput(node);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698