From 1a138034bd40f8efe77eb6bf852f3ddc3a183fb5 Mon Sep 17 00:00:00 2001 From: "jarin@chromium.org" Date: Wed, 18 Jun 2014 11:17:52 +0000 Subject: [PATCH] Fix LStoreCodeEntry to treat the code_object parameter as input. The bug seems to trigger only with array_index_dehoisting off in the snapshot, so it is hard to test for (ideas?). R=mvstanton@chromium.org BUG= Review URL: https://codereview.chromium.org/347523002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/lithium-arm.h | 6 +++--- src/ia32/lithium-ia32.h | 6 +++--- src/mips/lithium-mips.h | 6 +++--- src/x64/lithium-x64.h | 6 +++--- src/x87/lithium-x87.h | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h index 127badcfe9..e385893607 100644 --- a/src/arm/lithium-arm.h +++ b/src/arm/lithium-arm.h @@ -1771,15 +1771,15 @@ class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { }; -class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 1, 1> { +class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 2, 0> { public: LStoreCodeEntry(LOperand* function, LOperand* code_object) { inputs_[0] = function; - temps_[0] = code_object; + inputs_[1] = code_object; } LOperand* function() { return inputs_[0]; } - LOperand* code_object() { return temps_[0]; } + LOperand* code_object() { return inputs_[1]; } virtual void PrintDataTo(StringStream* stream); diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h index 56b53e0158..e12ca5e9bd 100644 --- a/src/ia32/lithium-ia32.h +++ b/src/ia32/lithium-ia32.h @@ -1784,15 +1784,15 @@ class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { }; -class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 1, 1> { +class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 2, 0> { public: LStoreCodeEntry(LOperand* function, LOperand* code_object) { inputs_[0] = function; - temps_[0] = code_object; + inputs_[1] = code_object; } LOperand* function() { return inputs_[0]; } - LOperand* code_object() { return temps_[0]; } + LOperand* code_object() { return inputs_[1]; } virtual void PrintDataTo(StringStream* stream); diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h index 25ffa4265a..ea3a658f3c 100644 --- a/src/mips/lithium-mips.h +++ b/src/mips/lithium-mips.h @@ -1732,15 +1732,15 @@ class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { }; -class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 1, 1> { +class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 2, 0> { public: LStoreCodeEntry(LOperand* function, LOperand* code_object) { inputs_[0] = function; - temps_[0] = code_object; + inputs_[1] = code_object; } LOperand* function() { return inputs_[0]; } - LOperand* code_object() { return temps_[0]; } + LOperand* code_object() { return inputs_[1]; } virtual void PrintDataTo(StringStream* stream); diff --git a/src/x64/lithium-x64.h b/src/x64/lithium-x64.h index 888c390c94..9609cfc9dc 100644 --- a/src/x64/lithium-x64.h +++ b/src/x64/lithium-x64.h @@ -1771,15 +1771,15 @@ class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { }; -class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 1, 1> { +class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 2, 0> { public: LStoreCodeEntry(LOperand* function, LOperand* code_object) { inputs_[0] = function; - temps_[0] = code_object; + inputs_[1] = code_object; } LOperand* function() { return inputs_[0]; } - LOperand* code_object() { return temps_[0]; } + LOperand* code_object() { return inputs_[1]; } virtual void PrintDataTo(StringStream* stream); diff --git a/src/x87/lithium-x87.h b/src/x87/lithium-x87.h index 6683f02909..8c992b8f6b 100644 --- a/src/x87/lithium-x87.h +++ b/src/x87/lithium-x87.h @@ -1799,15 +1799,15 @@ class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { }; -class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 1, 1> { +class LStoreCodeEntry V8_FINAL: public LTemplateInstruction<0, 2, 0> { public: LStoreCodeEntry(LOperand* function, LOperand* code_object) { inputs_[0] = function; - temps_[0] = code_object; + inputs_[1] = code_object; } LOperand* function() { return inputs_[0]; } - LOperand* code_object() { return temps_[0]; } + LOperand* code_object() { return inputs_[1]; } virtual void PrintDataTo(StringStream* stream);