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

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

Issue 1744163002: [stubs] Introduce a proper ToBooleanStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips Created 4 years, 9 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/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
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 1359
1360 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 1360 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
1361 1361
1362 HValue* value() const { return OperandAt(0); } 1362 HValue* value() const { return OperandAt(0); }
1363 }; 1363 };
1364 1364
1365 1365
1366 class HBranch final : public HUnaryControlInstruction { 1366 class HBranch final : public HUnaryControlInstruction {
1367 public: 1367 public:
1368 DECLARE_INSTRUCTION_FACTORY_P1(HBranch, HValue*); 1368 DECLARE_INSTRUCTION_FACTORY_P1(HBranch, HValue*);
1369 DECLARE_INSTRUCTION_FACTORY_P2(HBranch, HValue*, 1369 DECLARE_INSTRUCTION_FACTORY_P2(HBranch, HValue*, ToBooleanICStub::Types);
1370 ToBooleanStub::Types); 1370 DECLARE_INSTRUCTION_FACTORY_P4(HBranch, HValue*, ToBooleanICStub::Types,
1371 DECLARE_INSTRUCTION_FACTORY_P4(HBranch, HValue*,
1372 ToBooleanStub::Types,
1373 HBasicBlock*, HBasicBlock*); 1371 HBasicBlock*, HBasicBlock*);
1374 1372
1375 Representation RequiredInputRepresentation(int index) override { 1373 Representation RequiredInputRepresentation(int index) override {
1376 return Representation::None(); 1374 return Representation::None();
1377 } 1375 }
1378 Representation observed_input_representation(int index) override; 1376 Representation observed_input_representation(int index) override;
1379 1377
1380 bool KnownSuccessorBlock(HBasicBlock** block) override; 1378 bool KnownSuccessorBlock(HBasicBlock** block) override;
1381 1379
1382 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 1380 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
1383 1381
1384 ToBooleanStub::Types expected_input_types() const { 1382 ToBooleanICStub::Types expected_input_types() const {
1385 return expected_input_types_; 1383 return expected_input_types_;
1386 } 1384 }
1387 1385
1388 DECLARE_CONCRETE_INSTRUCTION(Branch) 1386 DECLARE_CONCRETE_INSTRUCTION(Branch)
1389 1387
1390 private: 1388 private:
1391 HBranch(HValue* value, 1389 HBranch(HValue* value, ToBooleanICStub::Types expected_input_types =
1392 ToBooleanStub::Types expected_input_types = ToBooleanStub::Types(), 1390 ToBooleanICStub::Types(),
1393 HBasicBlock* true_target = NULL, 1391 HBasicBlock* true_target = NULL, HBasicBlock* false_target = NULL)
1394 HBasicBlock* false_target = NULL)
1395 : HUnaryControlInstruction(value, true_target, false_target), 1392 : HUnaryControlInstruction(value, true_target, false_target),
1396 expected_input_types_(expected_input_types) { 1393 expected_input_types_(expected_input_types) {
1397 SetFlag(kAllowUndefinedAsNaN); 1394 SetFlag(kAllowUndefinedAsNaN);
1398 } 1395 }
1399 1396
1400 ToBooleanStub::Types expected_input_types_; 1397 ToBooleanICStub::Types expected_input_types_;
1401 }; 1398 };
1402 1399
1403 1400
1404 class HCompareMap final : public HUnaryControlInstruction { 1401 class HCompareMap final : public HUnaryControlInstruction {
1405 public: 1402 public:
1406 DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue*, Handle<Map>); 1403 DECLARE_INSTRUCTION_FACTORY_P2(HCompareMap, HValue*, Handle<Map>);
1407 DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue*, Handle<Map>, 1404 DECLARE_INSTRUCTION_FACTORY_P4(HCompareMap, HValue*, Handle<Map>,
1408 HBasicBlock*, HBasicBlock*); 1405 HBasicBlock*, HBasicBlock*);
1409 1406
1410 bool KnownSuccessorBlock(HBasicBlock** block) override { 1407 bool KnownSuccessorBlock(HBasicBlock** block) override {
(...skipping 6180 matching lines...) Expand 10 before | Expand all | Expand 10 after
7591 7588
7592 7589
7593 7590
7594 #undef DECLARE_INSTRUCTION 7591 #undef DECLARE_INSTRUCTION
7595 #undef DECLARE_CONCRETE_INSTRUCTION 7592 #undef DECLARE_CONCRETE_INSTRUCTION
7596 7593
7597 } // namespace internal 7594 } // namespace internal
7598 } // namespace v8 7595 } // namespace v8
7599 7596
7600 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7597 #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