Revision: 14605
Author: [email protected]
Date: Fri May 10 01:39:37 2013
Log: Don't CheckSmi when type is Smi.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/14890007
http://code.google.com/p/v8/source/detail?r=14605
Modified:
/branches/bleeding_edge/src/hydrogen.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Wed May 8 08:02:08 2013
+++ /branches/bleeding_edge/src/hydrogen.cc Fri May 10 01:39:37 2013
@@ -1129,8 +1129,10 @@
switch (elements_kind) {
case FAST_SMI_ELEMENTS:
case FAST_HOLEY_SMI_ELEMENTS:
- // Smi-only arrays need a smi check.
- AddInstruction(new(zone) HCheckSmi(val));
+ if (!val->type().IsSmi()) {
+ // Smi-only arrays need a smi check.
+ AddInstruction(new(zone) HCheckSmi(val));
+ }
// Fall through.
case FAST_ELEMENTS:
case FAST_HOLEY_ELEMENTS:
@@ -6934,9 +6936,11 @@
switch (boilerplate_elements_kind) {
case FAST_SMI_ELEMENTS:
case FAST_HOLEY_SMI_ELEMENTS:
- // Smi-only arrays need a smi check.
- AddInstruction(new(zone()) HCheckSmi(value));
- // Fall through.
+ if (!value->type().IsSmi()) {
+ // Smi-only arrays need a smi check.
+ AddInstruction(new(zone()) HCheckSmi(value));
+ // Fall through.
+ }
case FAST_ELEMENTS:
case FAST_HOLEY_ELEMENTS:
case FAST_DOUBLE_ELEMENTS:
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.