Clean some unuse code of unary negation
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/22089002 Patch from Weiliang Lin <weiliang.lin2@gmail.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ea38ee8782
commit
d5b9616991
@ -307,7 +307,6 @@ void UnaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
|
||||
bool UnaryOperation::ResultOverwriteAllowed() {
|
||||
switch (op_) {
|
||||
case Token::BIT_NOT:
|
||||
case Token::SUB:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -208,8 +208,6 @@ Builtins::JavaScript UnaryOpStub::ToJSBuiltin() {
|
||||
switch (operation_) {
|
||||
default:
|
||||
UNREACHABLE();
|
||||
case Token::SUB:
|
||||
return Builtins::UNARY_MINUS;
|
||||
case Token::BIT_NOT:
|
||||
return Builtins::BIT_NOT;
|
||||
}
|
||||
@ -239,10 +237,6 @@ void UnaryOpStub::UpdateStatus(Handle<Object> object) {
|
||||
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 BinaryOpStub::GenerateCallRuntime(MacroAssembler* masm) {
|
||||
|
||||
void UnaryOpStub::PrintBaseName(StringStream* stream) {
|
||||
CodeStub::PrintBaseName(stream);
|
||||
if (operation_ == Token::SUB) stream->Add("Minus");
|
||||
if (operation_ == Token::BIT_NOT) stream->Add("Not");
|
||||
}
|
||||
|
||||
|
@ -1807,7 +1807,6 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
|
||||
void VisitDelete(UnaryOperation* expr);
|
||||
void VisitVoid(UnaryOperation* expr);
|
||||
void VisitTypeof(UnaryOperation* expr);
|
||||
void VisitSub(UnaryOperation* expr);
|
||||
void VisitBitNot(UnaryOperation* expr);
|
||||
void VisitNot(UnaryOperation* expr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user