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

Side by Side Diff: src/compiler/ast-loop-assignment-analyzer.h

Issue 1970193002: [compiler] Avoid passing CompilationInfo to profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-sidechannel-2
Patch Set: Created 4 years, 7 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 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 #ifndef V8_COMPILER_AST_LOOP_ASSIGNMENT_ANALYZER_H_ 5 #ifndef V8_COMPILER_AST_LOOP_ASSIGNMENT_ANALYZER_H_
6 #define V8_COMPILER_AST_LOOP_ASSIGNMENT_ANALYZER_H_ 6 #define V8_COMPILER_AST_LOOP_ASSIGNMENT_ANALYZER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/bit-vector.h" 9 #include "src/bit-vector.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 class CompilationInfo;
16 class Scope;
15 class Variable; 17 class Variable;
16 class Scope;
17 18
18 namespace compiler { 19 namespace compiler {
19 20
20 // The result of analyzing loop assignments. 21 // The result of analyzing loop assignments.
21 class LoopAssignmentAnalysis : public ZoneObject { 22 class LoopAssignmentAnalysis : public ZoneObject {
22 public: 23 public:
23 BitVector* GetVariablesAssignedInLoop(IterationStatement* loop) { 24 BitVector* GetVariablesAssignedInLoop(IterationStatement* loop) {
24 for (size_t i = 0; i < list_.size(); i++) { 25 for (size_t i = 0; i < list_.size(); i++) {
25 // TODO(turbofan): hashmap or binary search for loop assignments. 26 // TODO(turbofan): hashmap or binary search for loop assignments.
26 if (list_[i].first == loop) return list_[i].second; 27 if (list_[i].first == loop) return list_[i].second;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void AnalyzeAssignment(Variable* var); 70 void AnalyzeAssignment(Variable* var);
70 71
71 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 72 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
72 DISALLOW_COPY_AND_ASSIGN(AstLoopAssignmentAnalyzer); 73 DISALLOW_COPY_AND_ASSIGN(AstLoopAssignmentAnalyzer);
73 }; 74 };
74 } // namespace compiler 75 } // namespace compiler
75 } // namespace internal 76 } // namespace internal
76 } // namespace v8 77 } // namespace v8
77 78
78 #endif // V8_COMPILER_AST_LOOP_ASSIGNMENT_ANALYZER_H_ 79 #endif // V8_COMPILER_AST_LOOP_ASSIGNMENT_ANALYZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698