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

Unified Diff: src/ia32/lithium-ia32.h

Issue 21037004: Fix HasResult method of LTemplateInstruction to properly handle LCheckSmi (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-ia32.h
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h
index 85c04685bad2a90503069ea9ea1747e9f384793a..5acf29ca5a6f6ef97713ccf6f423bf21ce589666 100644
--- a/src/ia32/lithium-ia32.h
+++ b/src/ia32/lithium-ia32.h
@@ -271,7 +271,7 @@ class LInstruction: public ZoneObject {
}
virtual bool HasResult() const = 0;
- virtual LOperand* result() = 0;
+ virtual LOperand* result() const = 0;
bool HasDoubleRegisterResult();
bool HasDoubleRegisterInput();
@@ -311,9 +311,9 @@ class LTemplateInstruction: public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
- virtual bool HasResult() const { return R != 0; }
+ virtual bool HasResult() const { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
- LOperand* result() { return results_[0]; }
+ LOperand* result() const { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698