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

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

Issue 1021183002: [turbofan] Turn Math.clz32 into an inlinable builtin. (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 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 case Runtime::kInlineIsFunction: 1511 case Runtime::kInlineIsFunction:
1512 case Runtime::kInlineIsRegExp: 1512 case Runtime::kInlineIsRegExp:
1513 return Bounds(Type::None(zone()), Type::Boolean(zone())); 1513 return Bounds(Type::None(zone()), Type::Boolean(zone()));
1514 case Runtime::kInlineDoubleLo: 1514 case Runtime::kInlineDoubleLo:
1515 case Runtime::kInlineDoubleHi: 1515 case Runtime::kInlineDoubleHi:
1516 return Bounds(Type::None(zone()), Type::Signed32()); 1516 return Bounds(Type::None(zone()), Type::Signed32());
1517 case Runtime::kInlineConstructDouble: 1517 case Runtime::kInlineConstructDouble:
1518 case Runtime::kInlineMathFloor: 1518 case Runtime::kInlineMathFloor:
1519 case Runtime::kInlineMathSqrt: 1519 case Runtime::kInlineMathSqrt:
1520 return Bounds(Type::None(zone()), Type::Number()); 1520 return Bounds(Type::None(zone()), Type::Number());
1521 case Runtime::kInlineMathClz32:
1522 return Bounds(Type::None(), Type::Range(0, 32, zone()));
1521 default: 1523 default:
1522 break; 1524 break;
1523 } 1525 }
1524 return Bounds::Unbounded(zone()); 1526 return Bounds::Unbounded(zone());
1525 } 1527 }
1526 1528
1527 1529
1528 Bounds Typer::Visitor::TypeJSDebugger(Node* node) { 1530 Bounds Typer::Visitor::TypeJSDebugger(Node* node) {
1529 UNREACHABLE(); 1531 UNREACHABLE();
1530 return Bounds(); 1532 return Bounds();
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 Bounds Typer::Visitor::TypeWord32Ror(Node* node) { 1814 Bounds Typer::Visitor::TypeWord32Ror(Node* node) {
1813 return Bounds(Type::Integral32()); 1815 return Bounds(Type::Integral32());
1814 } 1816 }
1815 1817
1816 1818
1817 Bounds Typer::Visitor::TypeWord32Equal(Node* node) { 1819 Bounds Typer::Visitor::TypeWord32Equal(Node* node) {
1818 return Bounds(Type::Boolean()); 1820 return Bounds(Type::Boolean());
1819 } 1821 }
1820 1822
1821 1823
1824 Bounds Typer::Visitor::TypeWord32Clz(Node* node) {
1825 return Bounds(Type::Integral32());
1826 }
1827
1828
1822 Bounds Typer::Visitor::TypeWord64And(Node* node) { 1829 Bounds Typer::Visitor::TypeWord64And(Node* node) {
1823 return Bounds(Type::Internal()); 1830 return Bounds(Type::Internal());
1824 } 1831 }
1825 1832
1826 1833
1827 Bounds Typer::Visitor::TypeWord64Or(Node* node) { 1834 Bounds Typer::Visitor::TypeWord64Or(Node* node) {
1828 return Bounds(Type::Internal()); 1835 return Bounds(Type::Internal());
1829 } 1836 }
1830 1837
1831 1838
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 TYPED_ARRAYS(TYPED_ARRAY_CASE) 2230 TYPED_ARRAYS(TYPED_ARRAY_CASE)
2224 #undef TYPED_ARRAY_CASE 2231 #undef TYPED_ARRAY_CASE
2225 } 2232 }
2226 } 2233 }
2227 return Type::Constant(value, zone()); 2234 return Type::Constant(value, zone());
2228 } 2235 }
2229 2236
2230 } // namespace compiler 2237 } // namespace compiler
2231 } // namespace internal 2238 } // namespace internal
2232 } // namespace v8 2239 } // 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