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

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

Issue 897883002: [turbofan]: Improved source position information (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 5 years, 10 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 | « src/compiler/source-position.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 #include "src/compiler/graph-reducer.h" 6 #include "src/compiler/graph-reducer.h"
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 Type* cache_[kNumLazyCachedTypes]; 137 Type* cache_[kNumLazyCachedTypes];
138 Isolate* isolate_; 138 Isolate* isolate_;
139 Zone* zone_; 139 Zone* zone_;
140 }; 140 };
141 141
142 142
143 class Typer::Decorator FINAL : public GraphDecorator { 143 class Typer::Decorator FINAL : public GraphDecorator {
144 public: 144 public:
145 explicit Decorator(Typer* typer) : typer_(typer) {} 145 explicit Decorator(Typer* typer) : typer_(typer) {}
146 void Decorate(Node* node) FINAL; 146 void Decorate(Node* node, bool incomplete) FINAL;
147 147
148 private: 148 private:
149 Typer* typer_; 149 Typer* typer_;
150 }; 150 };
151 151
152 152
153 Typer::Typer(Isolate* isolate, Graph* graph, MaybeHandle<Context> context) 153 Typer::Typer(Isolate* isolate, Graph* graph, MaybeHandle<Context> context)
154 : isolate_(isolate), 154 : isolate_(isolate),
155 graph_(graph), 155 graph_(graph),
156 context_(context), 156 context_(context),
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 401 }
402 } 402 }
403 403
404 Visitor visitor(this); 404 Visitor visitor(this);
405 GraphReducer graph_reducer(graph(), zone()); 405 GraphReducer graph_reducer(graph(), zone());
406 graph_reducer.AddReducer(&visitor); 406 graph_reducer.AddReducer(&visitor);
407 graph_reducer.ReduceGraph(); 407 graph_reducer.ReduceGraph();
408 } 408 }
409 409
410 410
411 void Typer::Decorator::Decorate(Node* node) { 411 void Typer::Decorator::Decorate(Node* node, bool incomplete) {
412 if (incomplete) return;
412 if (node->op()->ValueOutputCount() > 0) { 413 if (node->op()->ValueOutputCount() > 0) {
413 // Only eagerly type-decorate nodes with known input types. 414 // Only eagerly type-decorate nodes with known input types.
414 // Other cases will generally require a proper fixpoint iteration with Run. 415 // Other cases will generally require a proper fixpoint iteration with Run.
415 bool is_typed = NodeProperties::IsTyped(node); 416 bool is_typed = NodeProperties::IsTyped(node);
416 if (is_typed || NodeProperties::AllValueInputsAreTyped(node)) { 417 if (is_typed || NodeProperties::AllValueInputsAreTyped(node)) {
417 Visitor typing(typer_); 418 Visitor typing(typer_);
418 Bounds bounds = typing.TypeNode(node); 419 Bounds bounds = typing.TypeNode(node);
419 if (is_typed) { 420 if (is_typed) {
420 bounds = 421 bounds =
421 Bounds::Both(bounds, NodeProperties::GetBounds(node), typer_->zone()); 422 Bounds::Both(bounds, NodeProperties::GetBounds(node), typer_->zone());
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 TYPED_ARRAYS(TYPED_ARRAY_CASE) 2136 TYPED_ARRAYS(TYPED_ARRAY_CASE)
2136 #undef TYPED_ARRAY_CASE 2137 #undef TYPED_ARRAY_CASE
2137 } 2138 }
2138 } 2139 }
2139 return Type::Constant(value, zone()); 2140 return Type::Constant(value, zone());
2140 } 2141 }
2141 2142
2142 } // namespace compiler 2143 } // namespace compiler
2143 } // namespace internal 2144 } // namespace internal
2144 } // namespace v8 2145 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/source-position.cc ('k') | test/cctest/compiler/test-simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698