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

Side by Side Diff: src/hydrogen.cc

Issue 222213004: Merged r19804, r19890, r19894, r19935 into 3.24 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.24
Patch Set: Created 6 years, 8 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 | « src/handles.cc ('k') | src/objects.h » ('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 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 8926 matching lines...) Expand 10 before | Expand all | Expand 10 after
8937 static bool ShiftAmountsAllowReplaceByRotate(HValue* sa, 8937 static bool ShiftAmountsAllowReplaceByRotate(HValue* sa,
8938 HValue* const32_minus_sa) { 8938 HValue* const32_minus_sa) {
8939 if (sa->IsConstant() && const32_minus_sa->IsConstant()) { 8939 if (sa->IsConstant() && const32_minus_sa->IsConstant()) {
8940 const HConstant* c1 = HConstant::cast(sa); 8940 const HConstant* c1 = HConstant::cast(sa);
8941 const HConstant* c2 = HConstant::cast(const32_minus_sa); 8941 const HConstant* c2 = HConstant::cast(const32_minus_sa);
8942 return c1->HasInteger32Value() && c2->HasInteger32Value() && 8942 return c1->HasInteger32Value() && c2->HasInteger32Value() &&
8943 (c1->Integer32Value() + c2->Integer32Value() == 32); 8943 (c1->Integer32Value() + c2->Integer32Value() == 32);
8944 } 8944 }
8945 if (!const32_minus_sa->IsSub()) return false; 8945 if (!const32_minus_sa->IsSub()) return false;
8946 HSub* sub = HSub::cast(const32_minus_sa); 8946 HSub* sub = HSub::cast(const32_minus_sa);
8947 if (sa != sub->right()) return false; 8947 return sub->left()->EqualsInteger32Constant(32) && sub->right() == sa;
8948 HValue* const32 = sub->left();
8949 if (!const32->IsConstant() ||
8950 HConstant::cast(const32)->Integer32Value() != 32) {
8951 return false;
8952 }
8953 return (sub->right() == sa);
8954 } 8948 }
8955 8949
8956 8950
8957 // Checks if the left and the right are shift instructions with the oposite 8951 // Checks if the left and the right are shift instructions with the oposite
8958 // directions that can be replaced by one rotate right instruction or not. 8952 // directions that can be replaced by one rotate right instruction or not.
8959 // Returns the operand and the shift amount for the rotate instruction in the 8953 // Returns the operand and the shift amount for the rotate instruction in the
8960 // former case. 8954 // former case.
8961 bool HGraphBuilder::MatchRotateRight(HValue* left, 8955 bool HGraphBuilder::MatchRotateRight(HValue* left,
8962 HValue* right, 8956 HValue* right,
8963 HValue** operand, 8957 HValue** operand,
(...skipping 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after
11260 if (ShouldProduceTraceOutput()) { 11254 if (ShouldProduceTraceOutput()) {
11261 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11255 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11262 } 11256 }
11263 11257
11264 #ifdef DEBUG 11258 #ifdef DEBUG
11265 graph_->Verify(false); // No full verify. 11259 graph_->Verify(false); // No full verify.
11266 #endif 11260 #endif
11267 } 11261 }
11268 11262
11269 } } // namespace v8::internal 11263 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698