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

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

Issue 2828573004: [turbofan] Fix typing rule for JSCreateArguments. (Closed)
Patch Set: Also fix the verifier. Created 3 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 | « no previous file | src/compiler/types.h » ('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 <iomanip> 7 #include <iomanip>
8 8
9 #include "src/base/flags.h" 9 #include "src/base/flags.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 return TypeUnaryOp(node, ToString); 1109 return TypeUnaryOp(node, ToString);
1110 } 1110 }
1111 1111
1112 // JS object operators. 1112 // JS object operators.
1113 1113
1114 1114
1115 Type* Typer::Visitor::TypeJSCreate(Node* node) { return Type::Object(); } 1115 Type* Typer::Visitor::TypeJSCreate(Node* node) { return Type::Object(); }
1116 1116
1117 1117
1118 Type* Typer::Visitor::TypeJSCreateArguments(Node* node) { 1118 Type* Typer::Visitor::TypeJSCreateArguments(Node* node) {
1119 return Type::OtherObject(); 1119 switch (CreateArgumentsTypeOf(node->op())) {
1120 case CreateArgumentsType::kRestParameter:
1121 return Type::Array();
1122 case CreateArgumentsType::kMappedArguments:
1123 case CreateArgumentsType::kUnmappedArguments:
1124 return Type::OtherObject();
1125 }
1126 UNREACHABLE();
1127 return nullptr;
1120 } 1128 }
1121 1129
1122 Type* Typer::Visitor::TypeJSCreateArray(Node* node) { return Type::Array(); } 1130 Type* Typer::Visitor::TypeJSCreateArray(Node* node) { return Type::Array(); }
1123 1131
1124 Type* Typer::Visitor::TypeJSCreateClosure(Node* node) { 1132 Type* Typer::Visitor::TypeJSCreateClosure(Node* node) {
1125 return Type::Function(); 1133 return Type::Function();
1126 } 1134 }
1127 1135
1128 1136
1129 Type* Typer::Visitor::TypeJSCreateIterResultObject(Node* node) { 1137 Type* Typer::Visitor::TypeJSCreateIterResultObject(Node* node) {
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 2003 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1996 if (Type::IsInteger(*value)) { 2004 if (Type::IsInteger(*value)) {
1997 return Type::Range(value->Number(), value->Number(), zone()); 2005 return Type::Range(value->Number(), value->Number(), zone());
1998 } 2006 }
1999 return Type::NewConstant(value, zone()); 2007 return Type::NewConstant(value, zone());
2000 } 2008 }
2001 2009
2002 } // namespace compiler 2010 } // namespace compiler
2003 } // namespace internal 2011 } // namespace internal
2004 } // namespace v8 2012 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698