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

Unified Diff: src/hydrogen.cc

Issue 16134003: Support Smi in CompareIDAndBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 7 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 | « src/arm/lithium-codegen-arm.cc ('k') | 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 6655187f677624c3efb685558433618fce8b07cf..1df062c9ee0abf73fec7b30b831c4ffa12f8f6ef 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1128,7 +1128,7 @@ HValue* HGraphBuilder::BuildCheckForCapacityGrow(HValue* object,
Zone* zone = this->zone();
IfBuilder length_checker(this);
- length_checker.IfCompare(length, key, Token::EQ);
+ length_checker.IfCompare(length, key, Token::EQ, Representation::Smi());
length_checker.Then();
HValue* current_capacity =
@@ -1136,7 +1136,8 @@ HValue* HGraphBuilder::BuildCheckForCapacityGrow(HValue* object,
IfBuilder capacity_checker(this);
- capacity_checker.IfCompare(length, current_capacity, Token::EQ);
+ capacity_checker.IfCompare(
+ length, current_capacity, Token::EQ, Representation::Smi());
capacity_checker.Then();
HValue* context = environment()->LookupContext();
@@ -1258,11 +1259,11 @@ HInstruction* HGraphBuilder::BuildUncheckedMonomorphicElementAccess(
new(zone) HLoadExternalArrayPointer(elements);
AddInstruction(external_elements);
IfBuilder length_checker(this);
- length_checker.IfCompare(key, length, Token::LT);
+ length_checker.IfCompare(key, length, Token::LT, Representation::Smi());
length_checker.Then();
IfBuilder negative_checker(this);
HValue* bounds_check = negative_checker.IfCompare(
- key, graph()->GetConstant0(), Token::GTE);
+ key, graph()->GetConstant0(), Token::GTE, Representation::Smi());
negative_checker.Then();
HInstruction* result = BuildExternalArrayElementAccess(
external_elements, key, val, bounds_check,
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698