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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 166653005: Fix dictionary element load to pass correct elements kind. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Enable tests Created 6 years, 10 months 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.cc ('k') | test/mjsunit/mjsunit.status » ('j') | 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 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2774 2774
2775 Register result = ToRegister(instr->result()); 2775 Register result = ToRegister(instr->result());
2776 if (!access.IsInobject()) { 2776 if (!access.IsInobject()) {
2777 __ movp(result, FieldOperand(object, JSObject::kPropertiesOffset)); 2777 __ movp(result, FieldOperand(object, JSObject::kPropertiesOffset));
2778 object = result; 2778 object = result;
2779 } 2779 }
2780 2780
2781 Representation representation = access.representation(); 2781 Representation representation = access.representation();
2782 if (representation.IsSmi() && 2782 if (representation.IsSmi() &&
2783 instr->hydrogen()->representation().IsInteger32()) { 2783 instr->hydrogen()->representation().IsInteger32()) {
2784 #ifdef DEBUG
2785 Register scratch = kScratchRegister;
2786 __ Load(scratch, FieldOperand(object, offset), representation);
2787 __ AssertSmi(scratch);
2788 #endif
2789
2784 // Read int value directly from upper half of the smi. 2790 // Read int value directly from upper half of the smi.
2785 STATIC_ASSERT(kSmiTag == 0); 2791 STATIC_ASSERT(kSmiTag == 0);
2786 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); 2792 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
2787 offset += kPointerSize / 2; 2793 offset += kPointerSize / 2;
2788 representation = Representation::Integer32(); 2794 representation = Representation::Integer32();
2789 } 2795 }
2790 __ Load(result, FieldOperand(object, offset), representation); 2796 __ Load(result, FieldOperand(object, offset), representation);
2791 } 2797 }
2792 2798
2793 2799
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
3019 } 3025 }
3020 } 3026 }
3021 3027
3022 bool requires_hole_check = hinstr->RequiresHoleCheck(); 3028 bool requires_hole_check = hinstr->RequiresHoleCheck();
3023 int offset = FixedArray::kHeaderSize - kHeapObjectTag; 3029 int offset = FixedArray::kHeaderSize - kHeapObjectTag;
3024 Representation representation = hinstr->representation(); 3030 Representation representation = hinstr->representation();
3025 3031
3026 if (representation.IsInteger32() && 3032 if (representation.IsInteger32() &&
3027 hinstr->elements_kind() == FAST_SMI_ELEMENTS) { 3033 hinstr->elements_kind() == FAST_SMI_ELEMENTS) {
3028 ASSERT(!requires_hole_check); 3034 ASSERT(!requires_hole_check);
3035 #ifdef DEBUG
3036 Register scratch = kScratchRegister;
3037 __ Load(scratch,
3038 BuildFastArrayOperand(instr->elements(),
3039 key,
3040 FAST_ELEMENTS,
3041 offset,
3042 instr->additional_index()),
3043 Representation::Smi());
3044 __ AssertSmi(scratch);
3045 #endif
3029 // Read int value directly from upper half of the smi. 3046 // Read int value directly from upper half of the smi.
3030 STATIC_ASSERT(kSmiTag == 0); 3047 STATIC_ASSERT(kSmiTag == 0);
3031 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); 3048 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
3032 offset += kPointerSize / 2; 3049 offset += kPointerSize / 2;
3033 } 3050 }
3034 3051
3035 __ Load(result, 3052 __ Load(result,
3036 BuildFastArrayOperand(instr->elements(), 3053 BuildFastArrayOperand(instr->elements(),
3037 key, 3054 key,
3038 FAST_ELEMENTS, 3055 FAST_ELEMENTS,
(...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after
5552 FixedArray::kHeaderSize - kPointerSize)); 5569 FixedArray::kHeaderSize - kPointerSize));
5553 __ bind(&done); 5570 __ bind(&done);
5554 } 5571 }
5555 5572
5556 5573
5557 #undef __ 5574 #undef __
5558 5575
5559 } } // namespace v8::internal 5576 } } // namespace v8::internal
5560 5577
5561 #endif // V8_TARGET_ARCH_X64 5578 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698