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

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

Issue 1010673004: Tweak the TurboFan pipeline for stub compilation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Feedback Created 5 years, 9 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
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index ebe2e4e72330e8101e546d6cef0ca3c1ce25397c..df56ce67b36835457d76c1601da671ae7e6e7979 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -32,6 +32,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceInlineIsInstanceType(node, JS_ARRAY_TYPE);
case Runtime::kInlineIsFunction:
return ReduceInlineIsInstanceType(node, JS_FUNCTION_TYPE);
+ case Runtime::kInlineJSValueValue:
+ return ReduceInlineJSValueValue(node);
case Runtime::kInlineConstructDouble:
return ReduceInlineConstructDouble(node);
case Runtime::kInlineDoubleLo:
@@ -44,6 +46,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceInlineMathFloor(node);
case Runtime::kInlineMathSqrt:
return ReduceInlineMathSqrt(node);
+ case Runtime::kInlineStringLength:
+ return ReduceInlineStringLength(node);
case Runtime::kInlineValueOf:
return ReduceInlineValueOf(node);
default:
@@ -103,6 +107,19 @@ Reduction JSIntrinsicLowering::ReduceInlineIsNonNegativeSmi(Node* node) {
}
+Reduction JSIntrinsicLowering::ReduceInlineJSValueValue(Node* node) {
+ Node* value = NodeProperties::GetValueInput(node, 0);
+ Node* effect = NodeProperties::GetEffectInput(node);
+ Node* control = NodeProperties::GetControlInput(node);
+
+ Node* result =
+ graph()->NewNode(simplified()->LoadField(AccessBuilder::ForValue()),
+ value, effect, control);
+ NodeProperties::ReplaceWithValue(node, result);
titzer 2015/03/18 09:25:53 This looks like a good candidate to mutate in plac
Sven Panne 2015/03/18 10:40:08 Done.
+ return Replace(value);
+}
+
+
Reduction JSIntrinsicLowering::ReduceInlineConstructDouble(Node* node) {
Node* high = NodeProperties::GetValueInput(node, 0);
Node* low = NodeProperties::GetValueInput(node, 1);
@@ -177,6 +194,19 @@ Reduction JSIntrinsicLowering::ReduceInlineMathSqrt(Node* node) {
}
+Reduction JSIntrinsicLowering::ReduceInlineStringLength(Node* node) {
+ Node* value = NodeProperties::GetValueInput(node, 0);
+ Node* effect = NodeProperties::GetEffectInput(node);
+ Node* control = NodeProperties::GetControlInput(node);
+
+ Node* result = graph()->NewNode(
+ simplified()->LoadField(AccessBuilder::ForStringLength()), value, effect,
+ control);
+ NodeProperties::ReplaceWithValue(node, result);
titzer 2015/03/18 09:25:53 Same as above.
Sven Panne 2015/03/18 10:40:08 Done.
+ return Replace(value);
+}
+
+
Reduction JSIntrinsicLowering::ReduceInlineValueOf(Node* node) {
// if (%_IsSmi(value)) {
// return value;

Powered by Google App Engine
This is Rietveld 408576698