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

Side by Side Diff: src/crankshaft/hydrogen-instructions.h

Issue 2498563002: [cleanup] Replace ToBooleanICStub::Types with ToBooleanHints (Closed)
Patch Set: Created 4 years, 1 month 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/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-instructions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
11 #include "src/allocation.h" 11 #include "src/allocation.h"
12 #include "src/ast/ast.h" 12 #include "src/ast/ast.h"
13 #include "src/base/bits.h" 13 #include "src/base/bits.h"
14 #include "src/bit-vector.h" 14 #include "src/bit-vector.h"
15 #include "src/code-stubs.h"
16 #include "src/conversions.h" 15 #include "src/conversions.h"
17 #include "src/crankshaft/hydrogen-types.h" 16 #include "src/crankshaft/hydrogen-types.h"
18 #include "src/crankshaft/unique.h" 17 #include "src/crankshaft/unique.h"
19 #include "src/deoptimizer.h" 18 #include "src/deoptimizer.h"
20 #include "src/globals.h" 19 #include "src/globals.h"
20 #include "src/interface-descriptors.h"
21 #include "src/small-pointer-list.h" 21 #include "src/small-pointer-list.h"
22 #include "src/utils.h" 22 #include "src/utils.h"
23 #include "src/zone/zone.h" 23 #include "src/zone/zone.h"
24 24
25 namespace v8 { 25 namespace v8 {
26 namespace internal { 26 namespace internal {
27 27
28 // Forward declarations. 28 // Forward declarations.
29 struct ChangesOf; 29 struct ChangesOf;
30 class HBasicBlock; 30 class HBasicBlock;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 LInstruction* CompileToLithium(LChunkBuilder* builder) final; \ 179 LInstruction* CompileToLithium(LChunkBuilder* builder) final; \
180 static H##type* cast(HValue* value) { \ 180 static H##type* cast(HValue* value) { \
181 DCHECK(value->Is##type()); \ 181 DCHECK(value->Is##type()); \
182 return reinterpret_cast<H##type*>(value); \ 182 return reinterpret_cast<H##type*>(value); \
183 } \ 183 } \
184 Opcode opcode() const final { return HValue::k##type; } 184 Opcode opcode() const final { return HValue::k##type; }
185 185
186 186
187 enum PropertyAccessType { LOAD, STORE }; 187 enum PropertyAccessType { LOAD, STORE };
188 188
189 Representation RepresentationFromMachineType(MachineType type);
189 190
190 class Range final : public ZoneObject { 191 class Range final : public ZoneObject {
191 public: 192 public:
192 Range() 193 Range()
193 : lower_(kMinInt), 194 : lower_(kMinInt),
194 upper_(kMaxInt), 195 upper_(kMaxInt),
195 next_(NULL), 196 next_(NULL),
196 can_be_minus_zero_(false) { } 197 can_be_minus_zero_(false) { }
197 198
198 Range(int32_t lower, int32_t upper) 199 Range(int32_t lower, int32_t upper)
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 1343
1343 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 1344 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
1344 1345
1345 HValue* value() const { return OperandAt(0); } 1346 HValue* value() const { return OperandAt(0); }
1346 }; 1347 };
1347 1348
1348 1349
1349 class HBranch final : public HUnaryControlInstruction { 1350 class HBranch final : public HUnaryControlInstruction {
1350 public: 1351 public:
1351 DECLARE_INSTRUCTION_FACTORY_P1(HBranch, HValue*); 1352 DECLARE_INSTRUCTION_FACTORY_P1(HBranch, HValue*);
1352 DECLARE_INSTRUCTION_FACTORY_P2(HBranch, HValue*, ToBooleanICStub::Types); 1353 DECLARE_INSTRUCTION_FACTORY_P2(HBranch, HValue*, ToBooleanHints);
1353 DECLARE_INSTRUCTION_FACTORY_P4(HBranch, HValue*, ToBooleanICStub::Types, 1354 DECLARE_INSTRUCTION_FACTORY_P4(HBranch, HValue*, ToBooleanHints, HBasicBlock*,
1354 HBasicBlock*, HBasicBlock*); 1355 HBasicBlock*);
1355 1356
1356 Representation RequiredInputRepresentation(int index) override { 1357 Representation RequiredInputRepresentation(int index) override {
1357 return Representation::None(); 1358 return Representation::None();
1358 } 1359 }
1359 Representation observed_input_representation(int index) override; 1360 Representation observed_input_representation(int index) override;
1360 1361
1361 bool KnownSuccessorBlock(HBasicBlock** block) override; 1362 bool KnownSuccessorBlock(HBasicBlock** block) override;
1362 1363
1363 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 1364 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
1364 1365
1365 ToBooleanICStub::Types expected_input_types() const { 1366 ToBooleanHints expected_input_types() const { return expected_input_types_; }
1366 return expected_input_types_;
1367 }
1368 1367
1369 DECLARE_CONCRETE_INSTRUCTION(Branch) 1368 DECLARE_CONCRETE_INSTRUCTION(Branch)
1370 1369
1371 private: 1370 private:
1372 HBranch(HValue* value, ToBooleanICStub::Types expected_input_types = 1371 HBranch(HValue* value,
1373 ToBooleanICStub::Types(), 1372 ToBooleanHints expected_input_types = ToBooleanHint::kNone,
1374 HBasicBlock* true_target = NULL, HBasicBlock* false_target = NULL) 1373 HBasicBlock* true_target = NULL, HBasicBlock* false_target = NULL)
1375 : HUnaryControlInstruction(value, true_target, false_target), 1374 : HUnaryControlInstruction(value, true_target, false_target),
1376 expected_input_types_(expected_input_types) {} 1375 expected_input_types_(expected_input_types) {}
1377 1376
1378 ToBooleanICStub::Types expected_input_types_; 1377 ToBooleanHints expected_input_types_;
1379 }; 1378 };
1380 1379
1381 1380
1382 class HCompareMap final : public HUnaryControlInstruction { 1381 class HCompareMap final : public HUnaryControlInstruction {
1383 public: 1382 public:
1384 DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue*, Handle<Map>); 1383 DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue*, Handle<Map>);
1385 DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue*, Handle<Map>, 1384 DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue*, Handle<Map>,
1386 HBasicBlock*, HBasicBlock*); 1385 HBasicBlock*, HBasicBlock*);
1387 1386
1388 bool KnownSuccessorBlock(HBasicBlock** block) override { 1387 bool KnownSuccessorBlock(HBasicBlock** block) override {
(...skipping 5494 matching lines...) Expand 10 before | Expand all | Expand 10 after
6883 bool IsDeletable() const override { return true; } 6882 bool IsDeletable() const override { return true; }
6884 }; 6883 };
6885 6884
6886 #undef DECLARE_INSTRUCTION 6885 #undef DECLARE_INSTRUCTION
6887 #undef DECLARE_CONCRETE_INSTRUCTION 6886 #undef DECLARE_CONCRETE_INSTRUCTION
6888 6887
6889 } // namespace internal 6888 } // namespace internal
6890 } // namespace v8 6889 } // namespace v8
6891 6890
6892 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6891 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698