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

Unified Diff: src/hydrogen.cc

Issue 189843006: Revert "Use Representation::Integer32() for smi types on 32-bit-tagged systems." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 5b73eb64931d4428d2ae5ddedbd92869fae6a9a8..aa77a93fe76b9845f107dc33986effe2cbac9d41 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8740,7 +8740,7 @@ HInstruction* HOptimizedGraphBuilder::BuildIncrement(
// The input to the count operation is on top of the expression stack.
Representation rep = Representation::FromType(expr->type());
if (rep.IsNone() || rep.IsTagged()) {
- rep = Representation::FromType(Type::Smi());
+ rep = Representation::Smi();
}
if (returns_original_input) {
@@ -8990,8 +8990,14 @@ bool CanBeZero(HValue* right) {
HValue* HGraphBuilder::EnforceNumberType(HValue* number,
Type* expected) {
- return AddUncasted<HForceRepresentation>(
- number, Representation::FromType(expected));
+ if (expected->Is(Type::Smi())) {
+ return AddUncasted<HForceRepresentation>(number, Representation::Smi());
+ }
+ if (expected->Is(Type::Signed32())) {
+ return AddUncasted<HForceRepresentation>(number,
+ Representation::Integer32());
+ }
+ return number;
}
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698