| 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/graph-inl.h" | 5 #include "src/compiler/graph-inl.h" |
| 6 #include "src/compiler/js-operator.h" | 6 #include "src/compiler/js-operator.h" |
| 7 #include "src/compiler/node.h" | 7 #include "src/compiler/node.h" |
| 8 #include "src/compiler/node-properties-inl.h" | 8 #include "src/compiler/node-properties-inl.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 VALUE_OP_LIST(DECLARE_METHOD) | 88 VALUE_OP_LIST(DECLARE_METHOD) |
| 89 #undef DECLARE_METHOD | 89 #undef DECLARE_METHOD |
| 90 | 90 |
| 91 Bounds OperandType(Node* node, int i) { | 91 Bounds OperandType(Node* node, int i) { |
| 92 return NodeProperties::GetBounds(NodeProperties::GetValueInput(node, i)); | 92 return NodeProperties::GetBounds(NodeProperties::GetValueInput(node, i)); |
| 93 } | 93 } |
| 94 | 94 |
| 95 Type* ContextType(Node* node) { | 95 Type* ContextType(Node* node) { |
| 96 Bounds result = | 96 Bounds result = |
| 97 NodeProperties::GetBounds(NodeProperties::GetContextInput(node)); | 97 NodeProperties::GetBounds(NodeProperties::GetContextInput(node)); |
| 98 DCHECK(result.upper->Is(Type::Internal())); | 98 DCHECK(result.upper->Maybe(Type::Internal())); |
| 99 DCHECK(result.lower->Equals(result.upper)); | 99 // TODO(rossberg): More precisely, instead of the above assertion, we should |
| 100 // back-propagate the constraint that it has to be a subtype of Internal. |
| 100 return result.upper; | 101 return result.upper; |
| 101 } | 102 } |
| 102 | 103 |
| 103 Zone* zone() { return typer_->zone(); } | 104 Zone* zone() { return typer_->zone(); } |
| 104 Isolate* isolate() { return typer_->isolate(); } | 105 Isolate* isolate() { return typer_->isolate(); } |
| 105 MaybeHandle<Context> context() { return context_; } | 106 MaybeHandle<Context> context() { return context_; } |
| 106 | 107 |
| 107 private: | 108 private: |
| 108 Typer* typer_; | 109 Typer* typer_; |
| 109 MaybeHandle<Context> context_; | 110 MaybeHandle<Context> context_; |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 } | 849 } |
| 849 | 850 |
| 850 | 851 |
| 851 void Typer::DecorateGraph(Graph* graph) { | 852 void Typer::DecorateGraph(Graph* graph) { |
| 852 graph->AddDecorator(new (zone()) TyperDecorator(this)); | 853 graph->AddDecorator(new (zone()) TyperDecorator(this)); |
| 853 } | 854 } |
| 854 | 855 |
| 855 } | 856 } |
| 856 } | 857 } |
| 857 } // namespace v8::internal::compiler | 858 } // namespace v8::internal::compiler |
| OLD | NEW |