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

Side by Side Diff: src/compiler/typer.cc

Issue 990963003: [turbofan] Unify Math.floor / Math.ceil optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/base/flags.h" 5 #include "src/base/flags.h"
6 #include "src/bootstrapper.h" 6 #include "src/bootstrapper.h"
7 #include "src/compiler/graph-reducer.h" 7 #include "src/compiler/graph-reducer.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 case Runtime::kInlineIsSmi: 1503 case Runtime::kInlineIsSmi:
1504 case Runtime::kInlineIsNonNegativeSmi: 1504 case Runtime::kInlineIsNonNegativeSmi:
1505 case Runtime::kInlineIsArray: 1505 case Runtime::kInlineIsArray:
1506 case Runtime::kInlineIsFunction: 1506 case Runtime::kInlineIsFunction:
1507 case Runtime::kInlineIsRegExp: 1507 case Runtime::kInlineIsRegExp:
1508 return Bounds(Type::None(zone()), Type::Boolean(zone())); 1508 return Bounds(Type::None(zone()), Type::Boolean(zone()));
1509 case Runtime::kInlineDoubleLo: 1509 case Runtime::kInlineDoubleLo:
1510 case Runtime::kInlineDoubleHi: 1510 case Runtime::kInlineDoubleHi:
1511 return Bounds(Type::None(zone()), Type::Signed32()); 1511 return Bounds(Type::None(zone()), Type::Signed32());
1512 case Runtime::kInlineConstructDouble: 1512 case Runtime::kInlineConstructDouble:
1513 case Runtime::kInlineMathFloor:
1513 return Bounds(Type::None(zone()), Type::Number()); 1514 return Bounds(Type::None(zone()), Type::Number());
1514 default: 1515 default:
1515 break; 1516 break;
1516 } 1517 }
1517 return Bounds::Unbounded(zone()); 1518 return Bounds::Unbounded(zone());
1518 } 1519 }
1519 1520
1520 1521
1521 Bounds Typer::Visitor::TypeJSDebugger(Node* node) { 1522 Bounds Typer::Visitor::TypeJSDebugger(Node* node) {
1522 UNREACHABLE(); 1523 UNREACHABLE();
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 Bounds Typer::Visitor::TypeFloat64LessThan(Node* node) { 2079 Bounds Typer::Visitor::TypeFloat64LessThan(Node* node) {
2079 return Bounds(Type::Boolean()); 2080 return Bounds(Type::Boolean());
2080 } 2081 }
2081 2082
2082 2083
2083 Bounds Typer::Visitor::TypeFloat64LessThanOrEqual(Node* node) { 2084 Bounds Typer::Visitor::TypeFloat64LessThanOrEqual(Node* node) {
2084 return Bounds(Type::Boolean()); 2085 return Bounds(Type::Boolean());
2085 } 2086 }
2086 2087
2087 2088
2088 Bounds Typer::Visitor::TypeFloat64Floor(Node* node) { 2089 Bounds Typer::Visitor::TypeFloat64RoundDown(Node* node) {
2089 // TODO(sigurds): We could have a tighter bound here. 2090 // TODO(sigurds): We could have a tighter bound here.
2090 return Bounds(Type::Number()); 2091 return Bounds(Type::Number());
2091 } 2092 }
2092
2093
2094 Bounds Typer::Visitor::TypeFloat64Ceil(Node* node) {
2095 // TODO(sigurds): We could have a tighter bound here.
2096 return Bounds(Type::Number());
2097 }
2098 2093
2099 2094
2100 Bounds Typer::Visitor::TypeFloat64RoundTruncate(Node* node) { 2095 Bounds Typer::Visitor::TypeFloat64RoundTruncate(Node* node) {
2101 // TODO(sigurds): We could have a tighter bound here. 2096 // TODO(sigurds): We could have a tighter bound here.
2102 return Bounds(Type::Number()); 2097 return Bounds(Type::Number());
2103 } 2098 }
2104 2099
2105 2100
2106 Bounds Typer::Visitor::TypeFloat64RoundTiesAway(Node* node) { 2101 Bounds Typer::Visitor::TypeFloat64RoundTiesAway(Node* node) {
2107 // TODO(sigurds): We could have a tighter bound here. 2102 // TODO(sigurds): We could have a tighter bound here.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 TYPED_ARRAYS(TYPED_ARRAY_CASE) 2212 TYPED_ARRAYS(TYPED_ARRAY_CASE)
2218 #undef TYPED_ARRAY_CASE 2213 #undef TYPED_ARRAY_CASE
2219 } 2214 }
2220 } 2215 }
2221 return Type::Constant(value, zone()); 2216 return Type::Constant(value, zone());
2222 } 2217 }
2223 2218
2224 } // namespace compiler 2219 } // namespace compiler
2225 } // namespace internal 2220 } // namespace internal
2226 } // namespace v8 2221 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698