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 540283002: Fix another assertion in the context typer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698