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

Side by Side Diff: test/unittests/compiler/escape-analysis-unittest.cc

Issue 2797993006: [turbofan] Add type to the allocation operator. (Closed)
Patch Set: Remove caching Created 3 years, 8 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/typer.cc ('k') | test/unittests/compiler/load-elimination-unittest.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/escape-analysis.h" 5 #include "src/compiler/escape-analysis.h"
6 #include "src/bit-vector.h" 6 #include "src/bit-vector.h"
7 #include "src/compiler/escape-analysis-reducer.h" 7 #include "src/compiler/escape-analysis-reducer.h"
8 #include "src/compiler/graph-visualizer.h" 8 #include "src/compiler/graph-visualizer.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return effect_ = graph()->NewNode(common()->FinishRegion(), value, effect); 59 return effect_ = graph()->NewNode(common()->FinishRegion(), value, effect);
60 } 60 }
61 61
62 Node* Allocate(Node* size, Node* effect = nullptr, Node* control = nullptr) { 62 Node* Allocate(Node* size, Node* effect = nullptr, Node* control = nullptr) {
63 if (!effect) { 63 if (!effect) {
64 effect = effect_; 64 effect = effect_;
65 } 65 }
66 if (!control) { 66 if (!control) {
67 control = control_; 67 control = control_;
68 } 68 }
69 return effect_ = graph()->NewNode(simplified()->Allocate(), size, effect, 69 return effect_ = graph()->NewNode(simplified()->Allocate(Type::Any()), size,
70 control); 70 effect, control);
71 } 71 }
72 72
73 Node* Constant(int num) { 73 Node* Constant(int num) {
74 return graph()->NewNode(common()->NumberConstant(num)); 74 return graph()->NewNode(common()->NumberConstant(num));
75 } 75 }
76 76
77 Node* Store(const FieldAccess& access, Node* allocation, Node* value, 77 Node* Store(const FieldAccess& access, Node* allocation, Node* value,
78 Node* effect = nullptr, Node* control = nullptr) { 78 Node* effect = nullptr, Node* control = nullptr) {
79 if (!effect) { 79 if (!effect) {
80 effect = effect_; 80 effect = effect_;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 ASSERT_EQ(object1, NodeProperties::GetValueInput(object_state, 0)); 514 ASSERT_EQ(object1, NodeProperties::GetValueInput(object_state, 0));
515 ASSERT_EQ(object_state, NodeProperties::GetValueInput(object_state, 1)); 515 ASSERT_EQ(object_state, NodeProperties::GetValueInput(object_state, 1));
516 516
517 Node* object_state2 = NodeProperties::GetValueInput(state_values1, 0); 517 Node* object_state2 = NodeProperties::GetValueInput(state_values1, 0);
518 ASSERT_EQ(object_state, object_state2); 518 ASSERT_EQ(object_state, object_state2);
519 } 519 }
520 520
521 } // namespace compiler 521 } // namespace compiler
522 } // namespace internal 522 } // namespace internal
523 } // namespace v8 523 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | test/unittests/compiler/load-elimination-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698