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

Unified Diff: src/hydrogen.cc

Issue 15763004: Replace tagged keys for fast access by smi, and use smi in boundscheck. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed comment 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/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.h » ('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 305dc986e29e6ba7cdd1d6cf1bcd92a1c457c367..3c5732e4ac3e2097d3024b288b1b3a1772fd891e 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1003,14 +1003,6 @@ HBoundsCheck* HGraphBuilder::AddBoundsCheck(HValue* index,
HValue* length,
BoundsCheckKeyMode key_mode,
Representation r) {
- if (!index->type().IsSmi()) {
- index = new(graph()->zone()) HCheckSmiOrInt32(index);
- AddInstruction(HCheckSmiOrInt32::cast(index));
- }
- if (!length->type().IsSmi()) {
- length = new(graph()->zone()) HCheckSmiOrInt32(length);
- AddInstruction(HCheckSmiOrInt32::cast(length));
- }
HBoundsCheck* result = new(graph()->zone()) HBoundsCheck(
index, length, key_mode, r);
AddInstruction(result);
@@ -1338,11 +1330,7 @@ HInstruction* HGraphBuilder::BuildUncheckedMonomorphicElementAccess(
elements = BuildCheckForCapacityGrow(object, elements, elements_kind,
length, key, is_js_array);
- if (!key->type().IsSmi()) {
- checked_key = AddInstruction(new(zone) HCheckSmiOrInt32(key));
- } else {
- checked_key = key;
- }
+ checked_key = key;
} else {
checked_key = AddBoundsCheck(
key, length, ALLOW_SMI_KEY, checked_index_representation);
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698