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

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

Issue 11093026: Reapply descriptor array sharing. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: fix long line 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/x64/macro-assembler-x64.h ('k') | test/cctest/test-heap-profiler.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 2902 matching lines...) Expand 10 before | Expand all | Expand 10 after
2913 addsd(dst, scratch); 2913 addsd(dst, scratch);
2914 bind(&done); 2914 bind(&done);
2915 } 2915 }
2916 2916
2917 2917
2918 void MacroAssembler::LoadInstanceDescriptors(Register map, 2918 void MacroAssembler::LoadInstanceDescriptors(Register map,
2919 Register descriptors) { 2919 Register descriptors) {
2920 Register temp = descriptors; 2920 Register temp = descriptors;
2921 movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset)); 2921 movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset));
2922 2922
2923 Label ok, fail; 2923 Label ok, fail, load_from_back_pointer;
2924 CheckMap(temp, 2924 CheckMap(temp,
2925 isolate()->factory()->fixed_array_map(), 2925 isolate()->factory()->fixed_array_map(),
2926 &fail, 2926 &fail,
2927 DONT_DO_SMI_CHECK); 2927 DONT_DO_SMI_CHECK);
2928 movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset)); 2928 movq(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset));
2929 movq(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset));
2929 jmp(&ok); 2930 jmp(&ok);
2931
2930 bind(&fail); 2932 bind(&fail);
2933 CompareRoot(temp, Heap::kUndefinedValueRootIndex);
2934 j(not_equal, &load_from_back_pointer, Label::kNear);
2931 Move(descriptors, isolate()->factory()->empty_descriptor_array()); 2935 Move(descriptors, isolate()->factory()->empty_descriptor_array());
2936 jmp(&ok);
2937
2938 bind(&load_from_back_pointer);
2939 movq(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset));
2940 movq(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset));
2941 movq(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset));
2942
2932 bind(&ok); 2943 bind(&ok);
2933 } 2944 }
2934 2945
2935 2946
2947 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
2948 movq(dst, FieldOperand(map, Map::kBitField3Offset));
2949 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
2950 }
2951
2952
2936 void MacroAssembler::EnumLength(Register dst, Register map) { 2953 void MacroAssembler::EnumLength(Register dst, Register map) {
2937 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); 2954 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
2938 movq(dst, FieldOperand(map, Map::kBitField3Offset)); 2955 movq(dst, FieldOperand(map, Map::kBitField3Offset));
2939 Move(kScratchRegister, Smi::FromInt(Map::EnumLengthBits::kMask)); 2956 Move(kScratchRegister, Smi::FromInt(Map::EnumLengthBits::kMask));
2940 and_(dst, kScratchRegister); 2957 and_(dst, kScratchRegister);
2941 } 2958 }
2942 2959
2943 2960
2944 void MacroAssembler::DispatchMap(Register obj, 2961 void MacroAssembler::DispatchMap(Register obj,
2945 Handle<Map> map, 2962 Handle<Map> map,
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
4556 4573
4557 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4574 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4558 cmpq(rcx, null_value); 4575 cmpq(rcx, null_value);
4559 j(not_equal, &next); 4576 j(not_equal, &next);
4560 } 4577 }
4561 4578
4562 4579
4563 } } // namespace v8::internal 4580 } } // namespace v8::internal
4564 4581
4565 #endif // V8_TARGET_ARCH_X64 4582 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698