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

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 108633003: HLoadNamedField for Smis optimized for x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698