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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 11188031: Move DescriptorArray into the map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove padding area Created 8 years, 2 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/v8globals.h ('k') | test/cctest/test-alloc.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after
2898 movsd(scratch, Operand(kScratchRegister, 0)); 2898 movsd(scratch, Operand(kScratchRegister, 0));
2899 cvtlsi2sd(dst, src); 2899 cvtlsi2sd(dst, src);
2900 j(not_sign, &done, Label::kNear); 2900 j(not_sign, &done, Label::kNear);
2901 addsd(dst, scratch); 2901 addsd(dst, scratch);
2902 bind(&done); 2902 bind(&done);
2903 } 2903 }
2904 2904
2905 2905
2906 void MacroAssembler::LoadInstanceDescriptors(Register map, 2906 void MacroAssembler::LoadInstanceDescriptors(Register map,
2907 Register descriptors) { 2907 Register descriptors) {
2908 Register temp = descriptors; 2908 movq(descriptors, FieldOperand(map, Map::kDescriptorsOffset));
2909 movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset));
2910
2911 Label ok, fail, load_from_back_pointer;
2912 CheckMap(temp,
2913 isolate()->factory()->fixed_array_map(),
2914 &fail,
2915 DONT_DO_SMI_CHECK);
2916 movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset));
2917 jmp(&ok);
2918
2919 bind(&fail);
2920 CompareRoot(temp, Heap::kUndefinedValueRootIndex);
2921 j(not_equal, &load_from_back_pointer, Label::kNear);
2922 Move(descriptors, isolate()->factory()->empty_descriptor_array());
2923 jmp(&ok);
2924
2925 bind(&load_from_back_pointer);
2926 movq(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset));
2927 movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset));
2928
2929 bind(&ok);
2930 } 2909 }
2931 2910
2932 2911
2933 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { 2912 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
2934 movq(dst, FieldOperand(map, Map::kBitField3Offset)); 2913 movq(dst, FieldOperand(map, Map::kBitField3Offset));
2935 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); 2914 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
2936 } 2915 }
2937 2916
2938 2917
2939 void MacroAssembler::EnumLength(Register dst, Register map) { 2918 void MacroAssembler::EnumLength(Register dst, Register map) {
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
4573 4552
4574 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4553 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4575 cmpq(rcx, null_value); 4554 cmpq(rcx, null_value);
4576 j(not_equal, &next); 4555 j(not_equal, &next);
4577 } 4556 }
4578 4557
4579 4558
4580 } } // namespace v8::internal 4559 } } // namespace v8::internal
4581 4560
4582 #endif // V8_TARGET_ARCH_X64 4561 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8globals.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698