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

Side by Side Diff: src/hydrogen.cc

Issue 24366004: Split HCompareGeneric in a test and a branch part. (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
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 8301 matching lines...) Expand 10 before | Expand all | Expand 10 after
8312 BuildCheckHeapObject(right); 8312 BuildCheckHeapObject(right);
8313 AddInstruction(HCheckInstanceType::NewIsInternalizedString(right, zone())); 8313 AddInstruction(HCheckInstanceType::NewIsInternalizedString(right, zone()));
8314 HCompareObjectEqAndBranch* result = 8314 HCompareObjectEqAndBranch* result =
8315 New<HCompareObjectEqAndBranch>(left, right); 8315 New<HCompareObjectEqAndBranch>(left, right);
8316 result->set_position(expr->position()); 8316 result->set_position(expr->position());
8317 return ast_context()->ReturnControl(result, expr->id()); 8317 return ast_context()->ReturnControl(result, expr->id());
8318 } else { 8318 } else {
8319 if (combined_rep.IsTagged() || combined_rep.IsNone()) { 8319 if (combined_rep.IsTagged() || combined_rep.IsNone()) {
8320 HCompareGeneric* result = 8320 HCompareGeneric* result =
8321 new(zone()) HCompareGeneric(context, left, right, op); 8321 new(zone()) HCompareGeneric(context, left, right, op);
8322 AddInstruction(result);
8322 result->set_observed_input_representation(1, left_rep); 8323 result->set_observed_input_representation(1, left_rep);
8323 result->set_observed_input_representation(2, right_rep); 8324 result->set_observed_input_representation(2, right_rep);
8324 result->set_position(expr->position()); 8325 result->set_position(expr->position());
8325 return ast_context()->ReturnInstruction(result, expr->id()); 8326 return ast_context()->ReturnControl(AndBranch(result, op, expr->id()),
8327 expr->id());
8326 } else { 8328 } else {
8327 HCompareNumericAndBranch* result = 8329 HCompareNumericAndBranch* result =
8328 New<HCompareNumericAndBranch>(left, right, op); 8330 New<HCompareNumericAndBranch>(left, right, op);
8329 result->set_observed_input_representation(left_rep, right_rep); 8331 result->set_observed_input_representation(left_rep, right_rep);
8330 result->set_position(expr->position()); 8332 result->set_position(expr->position());
8331 return ast_context()->ReturnControl(result, expr->id()); 8333 return ast_context()->ReturnControl(result, expr->id());
8332 } 8334 }
8333 } 8335 }
8334 } 8336 }
8335 8337
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
9888 if (ShouldProduceTraceOutput()) { 9890 if (ShouldProduceTraceOutput()) {
9889 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9891 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9890 } 9892 }
9891 9893
9892 #ifdef DEBUG 9894 #ifdef DEBUG
9893 graph_->Verify(false); // No full verify. 9895 graph_->Verify(false); // No full verify.
9894 #endif 9896 #endif
9895 } 9897 }
9896 9898
9897 } } // namespace v8::internal 9899 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698