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

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

Issue 1908093002: [turbofan] Optimize tagged conversion based on type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 4 years, 8 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-operator-reducer.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/compiler/typer.h" 5 #include "src/compiler/typer.h"
6 6
7 #include "src/base/flags.h" 7 #include "src/base/flags.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone()); 1864 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone());
1865 } 1865 }
1866 1866
1867 1867
1868 Type* Typer::Visitor::TypeChangeTaggedToFloat64(Node* node) { 1868 Type* Typer::Visitor::TypeChangeTaggedToFloat64(Node* node) {
1869 Type* arg = Operand(node, 0); 1869 Type* arg = Operand(node, 0);
1870 // TODO(neis): DCHECK(arg->Is(Type::Number())); 1870 // TODO(neis): DCHECK(arg->Is(Type::Number()));
1871 return ChangeRepresentation(arg, Type::UntaggedFloat64(), zone()); 1871 return ChangeRepresentation(arg, Type::UntaggedFloat64(), zone());
1872 } 1872 }
1873 1873
1874 Type* Typer::Visitor::TypeChangeInt31ToTagged(Node* node) {
1875 Type* arg = Operand(node, 0);
1876 // TODO(neis): DCHECK(arg->Is(Type::Signed31()));
1877 Type* rep =
1878 arg->Is(Type::SignedSmall()) ? Type::TaggedSigned() : Type::Tagged();
1879 return ChangeRepresentation(arg, rep, zone());
1880 }
1874 1881
1875 Type* Typer::Visitor::TypeChangeInt32ToTagged(Node* node) { 1882 Type* Typer::Visitor::TypeChangeInt32ToTagged(Node* node) {
1876 Type* arg = Operand(node, 0); 1883 Type* arg = Operand(node, 0);
1877 // TODO(neis): DCHECK(arg->Is(Type::Signed32())); 1884 // TODO(neis): DCHECK(arg->Is(Type::Signed32()));
1878 Type* rep = 1885 Type* rep =
1879 arg->Is(Type::SignedSmall()) ? Type::TaggedSigned() : Type::Tagged(); 1886 arg->Is(Type::SignedSmall()) ? Type::TaggedSigned() : Type::Tagged();
1880 return ChangeRepresentation(arg, rep, zone()); 1887 return ChangeRepresentation(arg, rep, zone());
1881 } 1888 }
1882 1889
1883 1890
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
2563 } 2570 }
2564 if (Type::IsInteger(*value)) { 2571 if (Type::IsInteger(*value)) {
2565 return Type::Range(value->Number(), value->Number(), zone()); 2572 return Type::Range(value->Number(), value->Number(), zone());
2566 } 2573 }
2567 return Type::Constant(value, zone()); 2574 return Type::Constant(value, zone());
2568 } 2575 }
2569 2576
2570 } // namespace compiler 2577 } // namespace compiler
2571 } // namespace internal 2578 } // namespace internal
2572 } // namespace v8 2579 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698