Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1202 | 1202 |
| 1203 | 1203 |
| 1204 Type* Typer::Visitor::TypeJSDeleteProperty(Node* node) { | 1204 Type* Typer::Visitor::TypeJSDeleteProperty(Node* node) { |
| 1205 return Type::Boolean(); | 1205 return Type::Boolean(); |
| 1206 } | 1206 } |
| 1207 | 1207 |
| 1208 Type* Typer::Visitor::TypeJSHasProperty(Node* node) { return Type::Boolean(); } | 1208 Type* Typer::Visitor::TypeJSHasProperty(Node* node) { return Type::Boolean(); } |
| 1209 | 1209 |
| 1210 Type* Typer::Visitor::TypeJSInstanceOf(Node* node) { return Type::Boolean(); } | 1210 Type* Typer::Visitor::TypeJSInstanceOf(Node* node) { return Type::Boolean(); } |
| 1211 | 1211 |
| 1212 Type* Typer::Visitor::TypeJSGetSuperConstructor(Node* node) { | |
| 1213 return Type::Function(); | |
|
Benedikt Meurer
2016/11/23 04:51:00
This is probably not correct, as this can return a
| |
| 1214 } | |
| 1215 | |
| 1212 // JS context operators. | 1216 // JS context operators. |
| 1213 | 1217 |
| 1214 | 1218 |
| 1215 Type* Typer::Visitor::TypeJSLoadContext(Node* node) { | 1219 Type* Typer::Visitor::TypeJSLoadContext(Node* node) { |
| 1216 ContextAccess const& access = ContextAccessOf(node->op()); | 1220 ContextAccess const& access = ContextAccessOf(node->op()); |
| 1217 switch (access.index()) { | 1221 switch (access.index()) { |
| 1218 case Context::PREVIOUS_INDEX: | 1222 case Context::PREVIOUS_INDEX: |
| 1219 case Context::NATIVE_CONTEXT_INDEX: | 1223 case Context::NATIVE_CONTEXT_INDEX: |
| 1220 return Type::OtherInternal(); | 1224 return Type::OtherInternal(); |
| 1221 case Context::CLOSURE_INDEX: | 1225 case Context::CLOSURE_INDEX: |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1705 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { | 1709 Type* Typer::Visitor::TypeConstant(Handle<Object> value) { |
| 1706 if (Type::IsInteger(*value)) { | 1710 if (Type::IsInteger(*value)) { |
| 1707 return Type::Range(value->Number(), value->Number(), zone()); | 1711 return Type::Range(value->Number(), value->Number(), zone()); |
| 1708 } | 1712 } |
| 1709 return Type::NewConstant(value, zone()); | 1713 return Type::NewConstant(value, zone()); |
| 1710 } | 1714 } |
| 1711 | 1715 |
| 1712 } // namespace compiler | 1716 } // namespace compiler |
| 1713 } // namespace internal | 1717 } // namespace internal |
| 1714 } // namespace v8 | 1718 } // namespace v8 |
| OLD | NEW |