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

Side by Side Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased and fixed. Created 5 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
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-operator.h » ('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/js-intrinsic-lowering.h" 5 #include "src/compiler/js-intrinsic-lowering.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "src/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 Node* effect = NodeProperties::GetEffectInput(node); 170 Node* effect = NodeProperties::GetEffectInput(node);
171 Node* control = NodeProperties::GetControlInput(node); 171 Node* control = NodeProperties::GetControlInput(node);
172 return Change(node, simplified()->LoadField(AccessBuilder::ForMap()), value, 172 return Change(node, simplified()->LoadField(AccessBuilder::ForMap()), value,
173 effect, control); 173 effect, control);
174 } 174 }
175 175
176 176
177 Reduction JSIntrinsicLowering::ReduceIncrementStatsCounter(Node* node) { 177 Reduction JSIntrinsicLowering::ReduceIncrementStatsCounter(Node* node) {
178 if (!FLAG_native_code_counters) return ChangeToUndefined(node); 178 if (!FLAG_native_code_counters) return ChangeToUndefined(node);
179 HeapObjectMatcher m(NodeProperties::GetValueInput(node, 0)); 179 HeapObjectMatcher m(NodeProperties::GetValueInput(node, 0));
180 if (!m.HasValue() || !m.Value().handle()->IsString()) { 180 if (!m.HasValue() || !m.Value()->IsString()) {
181 return ChangeToUndefined(node); 181 return ChangeToUndefined(node);
182 } 182 }
183 base::SmartArrayPointer<char> name = 183 base::SmartArrayPointer<char> name =
184 Handle<String>::cast(m.Value().handle())->ToCString(); 184 Handle<String>::cast(m.Value())->ToCString();
185 StatsCounter counter(jsgraph()->isolate(), name.get()); 185 StatsCounter counter(jsgraph()->isolate(), name.get());
186 if (!counter.Enabled()) return ChangeToUndefined(node); 186 if (!counter.Enabled()) return ChangeToUndefined(node);
187 187
188 Node* effect = NodeProperties::GetEffectInput(node); 188 Node* effect = NodeProperties::GetEffectInput(node);
189 Node* control = NodeProperties::GetControlInput(node); 189 Node* control = NodeProperties::GetControlInput(node);
190 FieldAccess access = AccessBuilder::ForStatsCounter(); 190 FieldAccess access = AccessBuilder::ForStatsCounter();
191 Node* cnt = jsgraph()->ExternalConstant(ExternalReference(&counter)); 191 Node* cnt = jsgraph()->ExternalConstant(ExternalReference(&counter));
192 Node* load = 192 Node* load =
193 graph()->NewNode(simplified()->LoadField(access), cnt, effect, control); 193 graph()->NewNode(simplified()->LoadField(access), cnt, effect, control);
194 Node* inc = 194 Node* inc =
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 } 605 }
606 606
607 607
608 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { 608 MachineOperatorBuilder* JSIntrinsicLowering::machine() const {
609 return jsgraph()->machine(); 609 return jsgraph()->machine();
610 } 610 }
611 611
612 } // namespace compiler 612 } // namespace compiler
613 } // namespace internal 613 } // namespace internal
614 } // namespace v8 614 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698