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

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

Issue 1221433021: Move SmartPointer to base. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some unecessary header includes Created 5 years, 5 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
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 effect, control); 171 effect, control);
172 } 172 }
173 173
174 174
175 Reduction JSIntrinsicLowering::ReduceIncrementStatsCounter(Node* node) { 175 Reduction JSIntrinsicLowering::ReduceIncrementStatsCounter(Node* node) {
176 if (!FLAG_native_code_counters) return ChangeToUndefined(node); 176 if (!FLAG_native_code_counters) return ChangeToUndefined(node);
177 HeapObjectMatcher m(NodeProperties::GetValueInput(node, 0)); 177 HeapObjectMatcher m(NodeProperties::GetValueInput(node, 0));
178 if (!m.HasValue() || !m.Value().handle()->IsString()) { 178 if (!m.HasValue() || !m.Value().handle()->IsString()) {
179 return ChangeToUndefined(node); 179 return ChangeToUndefined(node);
180 } 180 }
181 SmartArrayPointer<char> name = 181 base::SmartArrayPointer<char> name =
182 Handle<String>::cast(m.Value().handle())->ToCString(); 182 Handle<String>::cast(m.Value().handle())->ToCString();
183 StatsCounter counter(jsgraph()->isolate(), name.get()); 183 StatsCounter counter(jsgraph()->isolate(), name.get());
184 if (!counter.Enabled()) return ChangeToUndefined(node); 184 if (!counter.Enabled()) return ChangeToUndefined(node);
185 185
186 Node* effect = NodeProperties::GetEffectInput(node); 186 Node* effect = NodeProperties::GetEffectInput(node);
187 Node* control = NodeProperties::GetControlInput(node); 187 Node* control = NodeProperties::GetControlInput(node);
188 FieldAccess access = AccessBuilder::ForStatsCounter(); 188 FieldAccess access = AccessBuilder::ForStatsCounter();
189 Node* cnt = jsgraph()->ExternalConstant(ExternalReference(&counter)); 189 Node* cnt = jsgraph()->ExternalConstant(ExternalReference(&counter));
190 Node* load = 190 Node* load =
191 graph()->NewNode(simplified()->LoadField(access), cnt, effect, control); 191 graph()->NewNode(simplified()->LoadField(access), cnt, effect, control);
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 597 }
598 598
599 599
600 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { 600 MachineOperatorBuilder* JSIntrinsicLowering::machine() const {
601 return jsgraph()->machine(); 601 return jsgraph()->machine();
602 } 602 }
603 603
604 } // namespace compiler 604 } // namespace compiler
605 } // namespace internal 605 } // namespace internal
606 } // namespace v8 606 } // namespace v8
OLDNEW
« BUILD.gn ('K') | « src/compiler/graph-visualizer.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698