Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
HChange is only deletable under certain circumstances. (issue 11092075)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mstarzin...@chromium.org  
View profile  
 More options Oct 11 2012, 9:48 am
From: mstarzin...@chromium.org
Date: Thu, 11 Oct 2012 13:48:43 +0000
Local: Thurs, Oct 11 2012 9:48 am
Subject: HChange is only deletable under certain circumstances. (issue 11092075)

https://codereview.chromium.org/11092075/diff/1/src/hydrogen-instruct...
File src/hydrogen-instructions.h (right):

https://codereview.chromium.org/11092075/diff/1/src/hydrogen-instruct...
src/hydrogen-instructions.h:1296: return !from().IsTagged() ||
(!to().IsDouble() && value()->type().IsSmi());
Why do we check that Smi->Double is not deleted? Shouldn't that be
possible without side-effects?

https://codereview.chromium.org/11092075/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
svenpa...@chromium.org  
View profile  
 More options Oct 11 2012, 10:11 am
From: svenpa...@chromium.org
Date: Thu, 11 Oct 2012 14:11:49 +0000
Local: Thurs, Oct 11 2012 10:11 am
Subject: Re: HChange is only deletable under certain circumstances. (issue 11092075)
Reviewers: Michael Starzinger,

Message:
Broadened check, PTAL...

https://codereview.chromium.org/11092075/diff/1/src/hydrogen-instruct...
File src/hydrogen-instructions.h (right):

https://codereview.chromium.org/11092075/diff/1/src/hydrogen-instruct...
src/hydrogen-instructions.h:1296: return !from().IsTagged() ||
(!to().IsDouble() && value()->type().IsSmi());
On 2012/10/11 13:48:43, Michael Starzinger wrote:

> Why do we check that Smi->Double is not deleted? Shouldn't that be
possible
> without side-effects?

Yep, it seems that the !to().IsDouble() part can be removed...

Description:
HChange is only deletable under certain circumstances.

R=mstarzin...@chromium.org

Please review this at https://codereview.chromium.org/11092075/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
   M src/hydrogen-instructions.h

Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index  
ae769fea0aefbbf8b0621a0967222e126dbf5c9a..f8ec100f2f0a3a7898e6c736b87672c9b 1fa226f  
100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1194,7 +1194,7 @@ class HUnaryOperation: public HTemplateInstruction<1>  
{
      return reinterpret_cast<HUnaryOperation*>(value);
    }

-  HValue* value() { return OperandAt(0); }
+  HValue* value() const { return OperandAt(0); }
    virtual void PrintDataTo(StringStream* stream);
  };

@@ -1270,8 +1270,8 @@ class HChange: public HUnaryOperation {
    virtual HType CalculateInferredType();
    virtual HValue* Canonicalize();

-  Representation from() { return value()->representation(); }
-  Representation to() { return representation(); }
+  Representation from() const { return value()->representation(); }
+  Representation to() const { return representation(); }
    bool deoptimize_on_undefined() const {
      return CheckFlag(kDeoptimizeOnUndefined);
    }
@@ -1292,7 +1292,9 @@ class HChange: public HUnaryOperation {
    virtual bool DataEquals(HValue* other) { return true; }

   private:
-  virtual bool IsDeletable() const { return true; }
+  virtual bool IsDeletable() const {
+    return !from().IsTagged() || value()->type().IsSmi();
+  }
  };


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mstarzin...@chromium.org  
View profile  
 More options Oct 11 2012, 10:13 am
From: mstarzin...@chromium.org
Date: Thu, 11 Oct 2012 14:13:35 +0000
Local: Thurs, Oct 11 2012 10:13 am
Subject: Re: HChange is only deletable under certain circumstances. (issue 11092075)
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »