Revision: 14896
Author: [email protected]
Date: Fri May 31 01:37:34 2013
Log: Fix DeferredTaggedToINoSSE2 to not unconditionally untag
undefined to 0.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/16228002
http://code.google.com/p/v8/source/detail?r=14896
Modified:
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
/branches/bleeding_edge/test/mjsunit/regress/regress-convert-hole.js
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Thu May 30
02:11:06 2013
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Fri May 31
01:37:34 2013
@@ -5352,15 +5352,20 @@
// Heap number map check.
__ cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
factory()->heap_number_map());
- __ j(equal, &heap_number, Label::kNear);
- // Check for undefined. Undefined is converted to zero for truncating
- // conversions.
- __ cmp(input_reg, factory()->undefined_value());
- __ RecordComment("Deferred TaggedToI: cannot truncate");
- DeoptimizeIf(not_equal, instr->environment());
- __ xor_(result_reg, result_reg);
- __ jmp(&done, Label::kFar);
- __ bind(&heap_number);
+ if (instr->truncating()) {
+ __ j(equal, &heap_number, Label::kNear);
+ // Check for undefined. Undefined is converted to zero for truncating
+ // conversions.
+ __ cmp(input_reg, factory()->undefined_value());
+ __ RecordComment("Deferred TaggedToI: cannot truncate");
+ DeoptimizeIf(not_equal, instr->environment());
+ __ xor_(result_reg, result_reg);
+ __ jmp(&done, Label::kFar);
+ __ bind(&heap_number);
+ } else {
+ // Deoptimize if we don't have a heap number.
+ DeoptimizeIf(not_equal, instr->environment());
+ }
// Surprisingly, all of this crazy bit manipulation is considerably
// faster than using the built-in x86 CPU conversion functions (about
6x).
=======================================
--- /branches/bleeding_edge/test/mjsunit/regress/regress-convert-hole.js
Thu May 30 02:11:06 2013
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-convert-hole.js
Fri May 31 01:37:34 2013
@@ -95,6 +95,7 @@
d = d|0;
}
a[d] = 1;
+ assertEquals(1, a[d]);
return d;
}
--
--
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.