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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
2836 XMMRegister result = ToDoubleRegister(instr->result()); 2836 XMMRegister result = ToDoubleRegister(instr->result());
2837 __ movsd(result, FieldOperand(object, offset)); 2837 __ movsd(result, FieldOperand(object, offset));
2838 return; 2838 return;
2839 } 2839 }
2840 2840
2841 Register result = ToRegister(instr->result()); 2841 Register result = ToRegister(instr->result());
2842 if (!access.IsInobject()) { 2842 if (!access.IsInobject()) {
2843 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); 2843 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset));
2844 object = result; 2844 object = result;
2845 } 2845 }
2846 __ Load(result, FieldOperand(object, offset), access.representation()); 2846
2847 Representation representation = access.representation();
2848 if (representation.IsSmi() &&
2849 instr->hydrogen()->representation().IsInteger32()) {
2850 // Read int value directly from upper half of the smi.
2851 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
2852 representation = Representation::Integer32();
2853 }
2854 __ Load(result, FieldOperand(object, offset), representation);
2847 } 2855 }
2848 2856
2849 2857
2850 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2858 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2851 ASSERT(ToRegister(instr->context()).is(rsi)); 2859 ASSERT(ToRegister(instr->context()).is(rsi));
2852 ASSERT(ToRegister(instr->object()).is(rax)); 2860 ASSERT(ToRegister(instr->object()).is(rax));
2853 ASSERT(ToRegister(instr->result()).is(rax)); 2861 ASSERT(ToRegister(instr->result()).is(rax));
2854 2862
2855 __ Move(rcx, instr->name()); 2863 __ Move(rcx, instr->name());
2856 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); 2864 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize();
(...skipping 2725 matching lines...) Expand 10 before | Expand all | Expand 10 after
5582 FixedArray::kHeaderSize - kPointerSize)); 5590 FixedArray::kHeaderSize - kPointerSize));
5583 __ bind(&done); 5591 __ bind(&done);
5584 } 5592 }
5585 5593
5586 5594
5587 #undef __ 5595 #undef __
5588 5596
5589 } } // namespace v8::internal 5597 } } // namespace v8::internal
5590 5598
5591 #endif // V8_TARGET_ARCH_X64 5599 #endif // V8_TARGET_ARCH_X64
OLDNEW
« 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