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

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

Issue 22339018: Deoptimization is easier to diagnose when there is a text reason. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 } 1241 }
1242 1242
1243 virtual void PrintDataTo(StringStream* stream); 1243 virtual void PrintDataTo(StringStream* stream);
1244 1244
1245 DECLARE_CONCRETE_INSTRUCTION(DummyUse); 1245 DECLARE_CONCRETE_INSTRUCTION(DummyUse);
1246 }; 1246 };
1247 1247
1248 1248
1249 class HDeoptimize: public HTemplateInstruction<0> { 1249 class HDeoptimize: public HTemplateInstruction<0> {
1250 public: 1250 public:
1251 DECLARE_INSTRUCTION_FACTORY_P1(HDeoptimize, Deoptimizer::BailoutType); 1251 DECLARE_INSTRUCTION_FACTORY_P2(HDeoptimize, const char*,
1252 Deoptimizer::BailoutType);
1252 1253
1253 virtual Representation RequiredInputRepresentation(int index) { 1254 virtual Representation RequiredInputRepresentation(int index) {
1254 return Representation::None(); 1255 return Representation::None();
1255 } 1256 }
1256 1257
1258 const char* reason() const { return reason_; }
1257 Deoptimizer::BailoutType type() { return type_; } 1259 Deoptimizer::BailoutType type() { return type_; }
1258 1260
1259 DECLARE_CONCRETE_INSTRUCTION(Deoptimize) 1261 DECLARE_CONCRETE_INSTRUCTION(Deoptimize)
1260 1262
1261 private: 1263 private:
1262 explicit HDeoptimize(Deoptimizer::BailoutType type) : type_(type) {} 1264 explicit HDeoptimize(const char* reason, Deoptimizer::BailoutType type)
1265 : reason_(reason), type_(type) {}
1263 1266
1267 const char* reason_;
1264 Deoptimizer::BailoutType type_; 1268 Deoptimizer::BailoutType type_;
1265 }; 1269 };
1266 1270
1267 1271
1268 // Inserts an int3/stop break instruction for debugging purposes. 1272 // Inserts an int3/stop break instruction for debugging purposes.
1269 class HDebugBreak: public HTemplateInstruction<0> { 1273 class HDebugBreak: public HTemplateInstruction<0> {
1270 public: 1274 public:
1271 virtual Representation RequiredInputRepresentation(int index) { 1275 virtual Representation RequiredInputRepresentation(int index) {
1272 return Representation::None(); 1276 return Representation::None();
1273 } 1277 }
(...skipping 5504 matching lines...) Expand 10 before | Expand all | Expand 10 after
6778 virtual bool IsDeletable() const { return true; } 6782 virtual bool IsDeletable() const { return true; }
6779 }; 6783 };
6780 6784
6781 6785
6782 #undef DECLARE_INSTRUCTION 6786 #undef DECLARE_INSTRUCTION
6783 #undef DECLARE_CONCRETE_INSTRUCTION 6787 #undef DECLARE_CONCRETE_INSTRUCTION
6784 6788
6785 } } // namespace v8::internal 6789 } } // namespace v8::internal
6786 6790
6787 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6791 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698