Revision: 16036
Author:   [email protected]
Date:     Sun Aug  4 23:34:26 2013
Log:      Clean some unuse code of unary negation

[email protected]

Review URL: https://codereview.chromium.org/22089002

Patch from Weiliang Lin <[email protected]>.
http://code.google.com/p/v8/source/detail?r=16036

Modified:
 /branches/bleeding_edge/src/ast.cc
 /branches/bleeding_edge/src/code-stubs.cc
 /branches/bleeding_edge/src/hydrogen.h

=======================================
--- /branches/bleeding_edge/src/ast.cc  Wed Jul 24 05:34:50 2013
+++ /branches/bleeding_edge/src/ast.cc  Sun Aug  4 23:34:26 2013
@@ -307,7 +307,6 @@
 bool UnaryOperation::ResultOverwriteAllowed() {
   switch (op_) {
     case Token::BIT_NOT:
-    case Token::SUB:
       return true;
     default:
       return false;
=======================================
--- /branches/bleeding_edge/src/code-stubs.cc   Mon Jul 29 02:12:16 2013
+++ /branches/bleeding_edge/src/code-stubs.cc   Sun Aug  4 23:34:26 2013
@@ -208,8 +208,6 @@
   switch (operation_) {
     default:
       UNREACHABLE();
-    case Token::SUB:
-      return Builtins::UNARY_MINUS;
     case Token::BIT_NOT:
       return Builtins::BIT_NOT;
   }
@@ -239,10 +237,6 @@
   State old_state(state_);
   if (object->IsSmi()) {
     state_.Add(SMI);
-    if (operation_ == Token::SUB && *object == 0) {
-      // The result (-0) has to be represented as double.
-      state_.Add(HEAP_NUMBER);
-    }
   } else if (object->IsHeapNumber()) {
     state_.Add(HEAP_NUMBER);
   } else {
@@ -356,7 +350,6 @@

 void UnaryOpStub::PrintBaseName(StringStream* stream) {
   CodeStub::PrintBaseName(stream);
-  if (operation_ == Token::SUB) stream->Add("Minus");
   if (operation_ == Token::BIT_NOT) stream->Add("Not");
 }

=======================================
--- /branches/bleeding_edge/src/hydrogen.h      Fri Aug  2 02:53:11 2013
+++ /branches/bleeding_edge/src/hydrogen.h      Sun Aug  4 23:34:26 2013
@@ -1807,7 +1807,6 @@
   void VisitDelete(UnaryOperation* expr);
   void VisitVoid(UnaryOperation* expr);
   void VisitTypeof(UnaryOperation* expr);
-  void VisitSub(UnaryOperation* expr);
   void VisitBitNot(UnaryOperation* expr);
   void VisitNot(UnaryOperation* expr);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to