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

Unified Diff: src/hydrogen.cc

Issue 187353005: Use Representation::Integer32() for smi types on 32-bit-tagged systems. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nit 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 891b58facd058b9b14712fbcc0ed60d6939ec4c4..a7163bf2eb691f4b25305ec34f2ff1e86b33ed65 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8741,7 +8741,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::Smi();
+ rep = Representation::FromType(Type::Smi());
}
if (returns_original_input) {
@@ -8991,14 +8991,8 @@ bool CanBeZero(HValue* right) {
HValue* HGraphBuilder::EnforceNumberType(HValue* number,
Type* 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;
+ return AddUncasted<HForceRepresentation>(
+ number, Representation::FromType(expected));
}
« 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