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

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

Issue 2535753004: [turbofan] Add appropriate types to express Callable. (Closed)
Patch Set: Add spec comments. Created 4 years 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/opcodes.h ('k') | 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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 UNREACHABLE(); 1237 UNREACHABLE();
1238 return nullptr; 1238 return nullptr;
1239 } 1239 }
1240 1240
1241 Type* Typer::Visitor::TypeJSDeleteProperty(Node* node) { 1241 Type* Typer::Visitor::TypeJSDeleteProperty(Node* node) {
1242 return Type::Boolean(); 1242 return Type::Boolean();
1243 } 1243 }
1244 1244
1245 Type* Typer::Visitor::TypeJSHasProperty(Node* node) { return Type::Boolean(); } 1245 Type* Typer::Visitor::TypeJSHasProperty(Node* node) { return Type::Boolean(); }
1246 1246
1247 Type* Typer::Visitor::TypeJSInstanceOf(Node* node) { return Type::Boolean(); } 1247 // JS instanceof operator.
1248 1248
1249 Type* Typer::Visitor::TypeJSOrdinaryHasInstance(Node* node) { 1249 Type* Typer::Visitor::JSInstanceOfTyper(Type* lhs, Type* rhs, Typer* t) {
1250 return Type::Boolean(); 1250 return Type::Boolean();
1251 } 1251 }
1252 1252
1253 Type* Typer::Visitor::JSOrdinaryHasInstanceTyper(Type* lhs, Type* rhs,
1254 Typer* t) {
1255 return Type::Boolean();
1256 }
1257
1253 // JS context operators. 1258 // JS context operators.
1254 1259
1255 1260
1256 Type* Typer::Visitor::TypeJSLoadContext(Node* node) { 1261 Type* Typer::Visitor::TypeJSLoadContext(Node* node) {
1257 ContextAccess const& access = ContextAccessOf(node->op()); 1262 ContextAccess const& access = ContextAccessOf(node->op());
1258 switch (access.index()) { 1263 switch (access.index()) {
1259 case Context::PREVIOUS_INDEX: 1264 case Context::PREVIOUS_INDEX:
1260 case Context::NATIVE_CONTEXT_INDEX: 1265 case Context::NATIVE_CONTEXT_INDEX:
1261 return Type::OtherInternal(); 1266 return Type::OtherInternal();
1262 case Context::CLOSURE_INDEX: 1267 case Context::CLOSURE_INDEX:
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { 1835 Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
1831 if (Type::IsInteger(*value)) { 1836 if (Type::IsInteger(*value)) {
1832 return Type::Range(value->Number(), value->Number(), zone()); 1837 return Type::Range(value->Number(), value->Number(), zone());
1833 } 1838 }
1834 return Type::NewConstant(value, zone()); 1839 return Type::NewConstant(value, zone());
1835 } 1840 }
1836 1841
1837 } // namespace compiler 1842 } // namespace compiler
1838 } // namespace internal 1843 } // namespace internal
1839 } // namespace v8 1844 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698