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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 63423004: Introduce %_IsMinusZero. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: extended test case Created 7 years, 1 month 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 | « src/hydrogen-instructions.h ('k') | src/hydrogen-minus-zero.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2937 return false; 2937 return false;
2938 } 2938 }
2939 2939
2940 2940
2941 void HCompareHoleAndBranch::InferRepresentation( 2941 void HCompareHoleAndBranch::InferRepresentation(
2942 HInferRepresentationPhase* h_infer) { 2942 HInferRepresentationPhase* h_infer) {
2943 ChangeRepresentation(value()->representation()); 2943 ChangeRepresentation(value()->representation());
2944 } 2944 }
2945 2945
2946 2946
2947 bool HCompareMinusZeroAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
2948 if (value()->representation().IsSmiOrInteger32()) {
2949 // A Smi or Integer32 cannot contain minus zero.
2950 *block = SecondSuccessor();
2951 return true;
2952 }
2953 *block = NULL;
2954 return false;
2955 }
2956
2957
2958 void HCompareMinusZeroAndBranch::InferRepresentation(
2959 HInferRepresentationPhase* h_infer) {
2960 ChangeRepresentation(value()->representation());
2961 }
2962
2963
2964
2947 void HGoto::PrintDataTo(StringStream* stream) { 2965 void HGoto::PrintDataTo(StringStream* stream) {
2948 stream->Add("B%d", SuccessorAt(0)->block_id()); 2966 stream->Add("B%d", SuccessorAt(0)->block_id());
2949 } 2967 }
2950 2968
2951 2969
2952 void HCompareNumericAndBranch::InferRepresentation( 2970 void HCompareNumericAndBranch::InferRepresentation(
2953 HInferRepresentationPhase* h_infer) { 2971 HInferRepresentationPhase* h_infer) {
2954 Representation left_rep = left()->representation(); 2972 Representation left_rep = left()->representation();
2955 Representation right_rep = right()->representation(); 2973 Representation right_rep = right()->representation();
2956 Representation observed_left = observed_input_representation(0); 2974 Representation observed_left = observed_input_representation(0);
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
4326 break; 4344 break;
4327 case kExternalMemory: 4345 case kExternalMemory:
4328 stream->Add("[external-memory]"); 4346 stream->Add("[external-memory]");
4329 break; 4347 break;
4330 } 4348 }
4331 4349
4332 stream->Add("@%d", offset()); 4350 stream->Add("@%d", offset());
4333 } 4351 }
4334 4352
4335 } } // namespace v8::internal 4353 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/hydrogen-minus-zero.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698