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

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

Issue 1579613002: [builtins] Refactor the remaining Date builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: As per offline discussion, remove the weird test, which does not add a lot of value. Created 4 years, 11 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/js-intrinsic-lowering.h ('k') | src/compiler/linkage.cc » ('j') | 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 1ae45ea775c6b62db50fb5f673298ca5db285b01..ca5cb932b4bd7606521b32ae63c7c8076779d74f 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -39,8 +39,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceConstructDouble(node);
case Runtime::kInlineCreateIterResultObject:
return ReduceCreateIterResultObject(node);
- case Runtime::kInlineDateField:
- return ReduceDateField(node);
case Runtime::kInlineDeoptimizeNow:
return ReduceDeoptimizeNow(node);
case Runtime::kInlineDoubleHi:
@@ -103,8 +101,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceToPrimitive(node);
case Runtime::kInlineToString:
return ReduceToString(node);
- case Runtime::kInlineThrowNotDateError:
- return ReduceThrowNotDateError(node);
case Runtime::kInlineCall:
return ReduceCall(node);
case Runtime::kInlineTailCall:
@@ -141,24 +137,6 @@ Reduction JSIntrinsicLowering::ReduceConstructDouble(Node* node) {
}
-Reduction JSIntrinsicLowering::ReduceDateField(Node* node) {
- Node* const value = NodeProperties::GetValueInput(node, 0);
- Node* const index = NodeProperties::GetValueInput(node, 1);
- Node* const effect = NodeProperties::GetEffectInput(node);
- Node* const control = NodeProperties::GetControlInput(node);
- NumberMatcher mindex(index);
- if (mindex.Is(JSDate::kDateValue)) {
- return Change(
- node,
- simplified()->LoadField(AccessBuilder::ForJSDateField(
- static_cast<JSDate::FieldIndex>(static_cast<int>(mindex.Value())))),
- value, effect, control);
- }
- // TODO(turbofan): Optimize more patterns.
- return NoChange();
-}
-
-
Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) {
if (mode() != kDeoptimizationEnabled) return NoChange();
Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0);
@@ -527,24 +505,6 @@ Reduction JSIntrinsicLowering::ReduceSubString(Node* node) {
}
-Reduction JSIntrinsicLowering::ReduceThrowNotDateError(Node* node) {
- if (mode() != kDeoptimizationEnabled) return NoChange();
- Node* const frame_state = NodeProperties::GetFrameStateInput(node, 1);
- Node* const effect = NodeProperties::GetEffectInput(node);
- Node* const control = NodeProperties::GetControlInput(node);
-
- // TODO(bmeurer): Move MergeControlToEnd() to the AdvancedReducer.
- Node* deoptimize =
- graph()->NewNode(common()->Deoptimize(DeoptimizeKind::kEager),
- frame_state, effect, control);
- NodeProperties::MergeControlToEnd(graph(), common(), deoptimize);
-
- node->TrimInputCount(0);
- NodeProperties::ChangeOp(node, common()->Dead());
- return Changed(node);
-}
-
-
Reduction JSIntrinsicLowering::ReduceToInteger(Node* node) {
Node* value = NodeProperties::GetValueInput(node, 0);
Type* value_type = NodeProperties::GetType(value);
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698