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

Side by Side Diff: src/compiler/type-hint-analyzer.h

Issue 1494973002: [turbofan] Introduce ToBooleanHints on ToBoolean operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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-operator.cc ('k') | src/compiler/type-hint-analyzer.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 #ifndef V8_COMPILER_TYPE_HINT_ANALYZER_H_ 5 #ifndef V8_COMPILER_TYPE_HINT_ANALYZER_H_
6 #define V8_COMPILER_TYPE_HINT_ANALYZER_H_ 6 #define V8_COMPILER_TYPE_HINT_ANALYZER_H_
7 7
8 #include "src/compiler/type-hints.h"
8 #include "src/handles.h" 9 #include "src/handles.h"
9 #include "src/utils.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 namespace compiler { 14 namespace compiler {
15 15
16 // Forward declarations.
17 class BinaryOperationHints;
18
19
20 // The result of analyzing type hints. 16 // The result of analyzing type hints.
21 class TypeHintAnalysis final : public ZoneObject { 17 class TypeHintAnalysis final : public ZoneObject {
22 public: 18 public:
23 typedef ZoneMap<TypeFeedbackId, Handle<Code>> Infos; 19 typedef ZoneMap<TypeFeedbackId, Handle<Code>> Infos;
24 20
25 explicit TypeHintAnalysis(Infos const& infos) : infos_(infos) {} 21 explicit TypeHintAnalysis(Infos const& infos) : infos_(infos) {}
26 22
27 bool GetBinaryOperationHints(TypeFeedbackId id, 23 bool GetBinaryOperationHints(TypeFeedbackId id,
28 BinaryOperationHints* hints) const; 24 BinaryOperationHints* hints) const;
25 bool GetToBooleanHints(TypeFeedbackId id, ToBooleanHints* hints) const;
29 26
30 private: 27 private:
31 Infos const infos_; 28 Infos const infos_;
32 }; 29 };
33 30
34 31
35 // The class that performs type hint analysis on the fullcodegen code object. 32 // The class that performs type hint analysis on the fullcodegen code object.
36 class TypeHintAnalyzer final { 33 class TypeHintAnalyzer final {
37 public: 34 public:
38 explicit TypeHintAnalyzer(Zone* zone) : zone_(zone) {} 35 explicit TypeHintAnalyzer(Zone* zone) : zone_(zone) {}
39 36
40 TypeHintAnalysis* Analyze(Handle<Code> code); 37 TypeHintAnalysis* Analyze(Handle<Code> code);
41 38
42 private: 39 private:
43 Zone* zone() const { return zone_; } 40 Zone* zone() const { return zone_; }
44 41
45 Zone* const zone_; 42 Zone* const zone_;
46 43
47 DISALLOW_COPY_AND_ASSIGN(TypeHintAnalyzer); 44 DISALLOW_COPY_AND_ASSIGN(TypeHintAnalyzer);
48 }; 45 };
49 46
50 } // namespace compiler 47 } // namespace compiler
51 } // namespace internal 48 } // namespace internal
52 } // namespace v8 49 } // namespace v8
53 50
54 #endif // V8_COMPILER_TYPE_HINT_ANALYZER_H_ 51 #endif // V8_COMPILER_TYPE_HINT_ANALYZER_H_
OLDNEW
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/compiler/type-hint-analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698