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

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

Issue 1901803002: [turbofan] Remove phase ordering problem in JSToNumber lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment 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.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 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 1838
1839 namespace { 1839 namespace {
1840 1840
1841 Type* ChangeRepresentation(Type* type, Type* rep, Zone* zone) { 1841 Type* ChangeRepresentation(Type* type, Type* rep, Zone* zone) {
1842 return Type::Union(Type::Semantic(type, zone), 1842 return Type::Union(Type::Semantic(type, zone),
1843 Type::Representation(rep, zone), zone); 1843 Type::Representation(rep, zone), zone);
1844 } 1844 }
1845 1845
1846 } // namespace 1846 } // namespace
1847 1847
1848 Type* Typer::Visitor::TypeChangeSmiToInt32(Node* node) {
1849 Type* arg = Operand(node, 0);
1850 // TODO(neis): DCHECK(arg->Is(Type::Signed32()));
1851 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone());
1852 }
1848 1853
1849 Type* Typer::Visitor::TypeChangeTaggedToInt32(Node* node) { 1854 Type* Typer::Visitor::TypeChangeTaggedToInt32(Node* node) {
1850 Type* arg = Operand(node, 0); 1855 Type* arg = Operand(node, 0);
1851 // TODO(neis): DCHECK(arg->Is(Type::Signed32())); 1856 // TODO(neis): DCHECK(arg->Is(Type::Signed32()));
1852 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone()); 1857 return ChangeRepresentation(arg, Type::UntaggedIntegral32(), zone());
1853 } 1858 }
1854 1859
1855 1860
1856 Type* Typer::Visitor::TypeChangeTaggedToUint32(Node* node) { 1861 Type* Typer::Visitor::TypeChangeTaggedToUint32(Node* node) {
1857 Type* arg = Operand(node, 0); 1862 Type* arg = Operand(node, 0);
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 } 2560 }
2556 if (Type::IsInteger(*value)) { 2561 if (Type::IsInteger(*value)) {
2557 return Type::Range(value->Number(), value->Number(), zone()); 2562 return Type::Range(value->Number(), value->Number(), zone());
2558 } 2563 }
2559 return Type::Constant(value, zone()); 2564 return Type::Constant(value, zone());
2560 } 2565 }
2561 2566
2562 } // namespace compiler 2567 } // namespace compiler
2563 } // namespace internal 2568 } // namespace internal
2564 } // namespace v8 2569 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698