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

Unified Diff: src/hydrogen.cc

Issue 17589013: Introduce Unsigned32 and RegExp types (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment Created 7 years, 6 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/ic.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 8d3a0ac813a90a6014ac6185473406c2ca5e8927..5874b09876c390058209f2c1e5c9dff10ca14ccd 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5015,7 +5015,7 @@ void HOptimizedGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
HControlInstruction* compare;
if (stmt->switch_type() == SwitchStatement::SMI_SWITCH) {
- if (!clause->compare_type()->Is(Type::Integer31())) {
+ if (!clause->compare_type()->Is(Type::Smi())) {
AddSoftDeoptimize();
}
@@ -9457,8 +9457,8 @@ HInstruction* HOptimizedGraphBuilder::BuildBinaryOperation(
break;
case Token::BIT_OR: {
HValue* operand, *shift_amount;
- if (left_type->Is(Type::Integer32()) &&
- right_type->Is(Type::Integer32()) &&
+ if (left_type->Is(Type::Signed32()) &&
+ right_type->Is(Type::Signed32()) &&
MatchRotateRight(left, right, &operand, &shift_amount)) {
instr = new(zone()) HRor(context, operand, shift_amount);
} else {
@@ -9658,7 +9658,7 @@ Representation HOptimizedGraphBuilder::ToRepresentation(TypeInfo info) {
Representation HOptimizedGraphBuilder::ToRepresentation(Handle<Type> type) {
if (type->Is(Type::None())) return Representation::None();
- if (type->Is(Type::Integer32())) return Representation::Integer32();
+ if (type->Is(Type::Signed32())) return Representation::Integer32();
if (type->Is(Type::Number())) return Representation::Double();
return Representation::Tagged();
}
@@ -9883,8 +9883,8 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
} else {
// TODO(verwaest): Remove once ToRepresentation properly returns Smi when
// the IC measures Smi.
- if (left_type->Is(Type::Integer31())) left_rep = Representation::Smi();
- if (right_type->Is(Type::Integer31())) right_rep = Representation::Smi();
+ if (left_type->Is(Type::Smi())) left_rep = Representation::Smi();
+ if (right_type->Is(Type::Smi())) right_rep = Representation::Smi();
HCompareIDAndBranch* result =
new(zone()) HCompareIDAndBranch(left, right, op);
result->set_observed_input_representation(left_rep, right_rep);
« no previous file with comments | « no previous file | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698