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

Side by Side Diff: src/hydrogen.cc

Issue 26419005: Delete dead code from HOptimizedGraphBuilder::VisitCompareOperation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 8321 matching lines...) Expand 10 before | Expand all | Expand 10 after
8332 return ast_context()->ReturnControl(result, expr->id()); 8332 return ast_context()->ReturnControl(result, expr->id());
8333 } else if (combined_type->Is(Type::String())) { 8333 } else if (combined_type->Is(Type::String())) {
8334 BuildCheckHeapObject(left); 8334 BuildCheckHeapObject(left);
8335 AddInstruction(HCheckInstanceType::NewIsString(left, zone())); 8335 AddInstruction(HCheckInstanceType::NewIsString(left, zone()));
8336 BuildCheckHeapObject(right); 8336 BuildCheckHeapObject(right);
8337 AddInstruction(HCheckInstanceType::NewIsString(right, zone())); 8337 AddInstruction(HCheckInstanceType::NewIsString(right, zone()));
8338 HStringCompareAndBranch* result = 8338 HStringCompareAndBranch* result =
8339 New<HStringCompareAndBranch>(left, right, op); 8339 New<HStringCompareAndBranch>(left, right, op);
8340 result->set_position(expr->position()); 8340 result->set_position(expr->position());
8341 return ast_context()->ReturnControl(result, expr->id()); 8341 return ast_context()->ReturnControl(result, expr->id());
8342 } else if (combined_type->NumClasses() == 1 && Token::IsEqualityOp(op)) {
rossberg 2013/10/15 10:49:18 This case isn't actually entirely dead, since it w
8343 BuildCheckHeapObject(left);
8344 BuildCheckMap(left, combined_type->Classes().Current());
8345 BuildCheckHeapObject(right);
8346 BuildCheckMap(right, combined_type->Classes().Current());
8347 HCompareObjectEqAndBranch* result =
8348 New<HCompareObjectEqAndBranch>(left, right);
8349 result->set_position(expr->position());
8350 return ast_context()->ReturnInstruction(result, expr->id());
8351 } else if (combined_type->Is(Type::Receiver()) && Token::IsEqualityOp(op)) {
8352 BuildCheckHeapObject(left);
8353 AddInstruction(HCheckInstanceType::NewIsSpecObject(left, zone()));
8354 BuildCheckHeapObject(right);
8355 AddInstruction(HCheckInstanceType::NewIsSpecObject(right, zone()));
8356 HCompareObjectEqAndBranch* result =
8357 New<HCompareObjectEqAndBranch>(left, right);
8358 result->set_position(expr->position());
8359 return ast_context()->ReturnInstruction(result, expr->id());
8360 } else { 8342 } else {
8361 if (combined_rep.IsTagged() || combined_rep.IsNone()) { 8343 if (combined_rep.IsTagged() || combined_rep.IsNone()) {
8362 HCompareGeneric* result = 8344 HCompareGeneric* result =
8363 new(zone()) HCompareGeneric(context, left, right, op); 8345 new(zone()) HCompareGeneric(context, left, right, op);
8364 result->set_observed_input_representation(1, left_rep); 8346 result->set_observed_input_representation(1, left_rep);
8365 result->set_observed_input_representation(2, right_rep); 8347 result->set_observed_input_representation(2, right_rep);
8366 result->set_position(expr->position()); 8348 result->set_position(expr->position());
8367 return ast_context()->ReturnInstruction(result, expr->id()); 8349 return ast_context()->ReturnInstruction(result, expr->id());
8368 } else { 8350 } else {
8369 HCompareNumericAndBranch* result = 8351 HCompareNumericAndBranch* result =
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
9885 if (ShouldProduceTraceOutput()) { 9867 if (ShouldProduceTraceOutput()) {
9886 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9868 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9887 } 9869 }
9888 9870
9889 #ifdef DEBUG 9871 #ifdef DEBUG
9890 graph_->Verify(false); // No full verify. 9872 graph_->Verify(false); // No full verify.
9891 #endif 9873 #endif
9892 } 9874 }
9893 9875
9894 } } // namespace v8::internal 9876 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698