Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 7c9949a1fad8da5b441e7ecd79d96ab41dbea073..f3a10266af293208b021e2a12f8c925779ff3470 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2843,7 +2843,15 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
__ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); |
object = result; |
} |
- __ Load(result, FieldOperand(object, offset), access.representation()); |
+ |
+ Representation representation = access.representation(); |
+ if (representation.IsSmi() && |
+ instr->hydrogen()->representation().IsInteger32()) { |
+ // Read int value directly from upper half of the smi. |
+ offset += kPointerSize / 2; |
Toon Verwaest
2013/12/09 13:49:44
If there's a kSmiTagSize, please use that instead.
Igor Sheludko
2013/12/09 16:10:36
There's no such constant. I'll add static assert i
|
+ representation = Representation::Integer32(); |
+ } |
+ __ Load(result, FieldOperand(object, offset), representation); |
} |