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

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

Issue 874323003: Externalize deoptimization reasons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: minor change Created 5 years, 10 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/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('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_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 1356
1357 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT 1357 std::ostream& PrintDataTo(std::ostream& os) const OVERRIDE; // NOLINT
1358 1358
1359 DECLARE_CONCRETE_INSTRUCTION(Goto) 1359 DECLARE_CONCRETE_INSTRUCTION(Goto)
1360 }; 1360 };
1361 1361
1362 1362
1363 class HDeoptimize FINAL : public HTemplateControlInstruction<1, 0> { 1363 class HDeoptimize FINAL : public HTemplateControlInstruction<1, 0> {
1364 public: 1364 public:
1365 static HDeoptimize* New(Isolate* isolate, Zone* zone, HValue* context, 1365 static HDeoptimize* New(Isolate* isolate, Zone* zone, HValue* context,
1366 const char* reason, Deoptimizer::BailoutType type, 1366 Deoptimizer::DeoptReason reason,
1367 Deoptimizer::BailoutType type,
1367 HBasicBlock* unreachable_continuation) { 1368 HBasicBlock* unreachable_continuation) {
1368 return new(zone) HDeoptimize(reason, type, unreachable_continuation); 1369 return new(zone) HDeoptimize(reason, type, unreachable_continuation);
1369 } 1370 }
1370 1371
1371 bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE { 1372 bool KnownSuccessorBlock(HBasicBlock** block) OVERRIDE {
1372 *block = NULL; 1373 *block = NULL;
1373 return true; 1374 return true;
1374 } 1375 }
1375 1376
1376 Representation RequiredInputRepresentation(int index) OVERRIDE { 1377 Representation RequiredInputRepresentation(int index) OVERRIDE {
1377 return Representation::None(); 1378 return Representation::None();
1378 } 1379 }
1379 1380
1380 const char* reason() const { return reason_; } 1381 Deoptimizer::DeoptReason reason() const { return reason_; }
1381 Deoptimizer::BailoutType type() { return type_; } 1382 Deoptimizer::BailoutType type() { return type_; }
1382 1383
1383 DECLARE_CONCRETE_INSTRUCTION(Deoptimize) 1384 DECLARE_CONCRETE_INSTRUCTION(Deoptimize)
1384 1385
1385 private: 1386 private:
1386 explicit HDeoptimize(const char* reason, 1387 explicit HDeoptimize(Deoptimizer::DeoptReason reason,
1387 Deoptimizer::BailoutType type, 1388 Deoptimizer::BailoutType type,
1388 HBasicBlock* unreachable_continuation) 1389 HBasicBlock* unreachable_continuation)
1389 : reason_(reason), type_(type) { 1390 : reason_(reason), type_(type) {
1390 SetSuccessorAt(0, unreachable_continuation); 1391 SetSuccessorAt(0, unreachable_continuation);
1391 } 1392 }
1392 1393
1393 const char* reason_; 1394 Deoptimizer::DeoptReason reason_;
1394 Deoptimizer::BailoutType type_; 1395 Deoptimizer::BailoutType type_;
1395 }; 1396 };
1396 1397
1397 1398
1398 class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> { 1399 class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> {
1399 public: 1400 public:
1400 HUnaryControlInstruction(HValue* value, 1401 HUnaryControlInstruction(HValue* value,
1401 HBasicBlock* true_target, 1402 HBasicBlock* true_target,
1402 HBasicBlock* false_target) { 1403 HBasicBlock* false_target) {
1403 SetOperandAt(0, value); 1404 SetOperandAt(0, value);
(...skipping 6595 matching lines...) Expand 10 before | Expand all | Expand 10 after
7999 }; 8000 };
8000 8001
8001 8002
8002 8003
8003 #undef DECLARE_INSTRUCTION 8004 #undef DECLARE_INSTRUCTION
8004 #undef DECLARE_CONCRETE_INSTRUCTION 8005 #undef DECLARE_CONCRETE_INSTRUCTION
8005 8006
8006 } } // namespace v8::internal 8007 } } // namespace v8::internal
8007 8008
8008 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8009 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698