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

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

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after
3698 3698
3699 3699
3700 void MacroAssembler::LoadElementsKindFromMap(Register result, Register map) { 3700 void MacroAssembler::LoadElementsKindFromMap(Register result, Register map) {
3701 // Load the map's "bit field 2". 3701 // Load the map's "bit field 2".
3702 __ Ldrb(result, FieldMemOperand(map, Map::kBitField2Offset)); 3702 __ Ldrb(result, FieldMemOperand(map, Map::kBitField2Offset));
3703 // Retrieve elements_kind from bit field 2. 3703 // Retrieve elements_kind from bit field 2.
3704 DecodeField<Map::ElementsKindBits>(result); 3704 DecodeField<Map::ElementsKindBits>(result);
3705 } 3705 }
3706 3706
3707 3707
3708 void MacroAssembler::GetMapConstructor(Register result, Register map,
3709 Register temp, Register temp2) {
3710 Label done, loop;
3711 Ldr(result, FieldMemOperand(map, Map::kConstructorOrBackPointerOffset));
3712 Bind(&loop);
3713 CompareObjectType(result, temp, temp2, MAP_TYPE);
3714 B(ne, &done);
3715 Ldr(result, FieldMemOperand(result, Map::kConstructorOrBackPointerOffset));
3716 B(&loop);
3717 Bind(&done);
3718 }
3719
3720
3708 void MacroAssembler::TryGetFunctionPrototype(Register function, 3721 void MacroAssembler::TryGetFunctionPrototype(Register function,
3709 Register result, 3722 Register result,
3710 Register scratch, 3723 Register scratch,
3711 Label* miss, 3724 Label* miss,
3712 BoundFunctionAction action) { 3725 BoundFunctionAction action) {
3713 DCHECK(!AreAliased(function, result, scratch)); 3726 DCHECK(!AreAliased(function, result, scratch));
3714 3727
3715 Label non_instance; 3728 Label non_instance;
3716 if (action == kMissOnBoundFunction) { 3729 if (action == kMissOnBoundFunction) {
3717 // Check that the receiver isn't a smi. 3730 // Check that the receiver isn't a smi.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3749 3762
3750 // Get the prototype from the initial map. 3763 // Get the prototype from the initial map.
3751 Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); 3764 Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset));
3752 3765
3753 if (action == kMissOnBoundFunction) { 3766 if (action == kMissOnBoundFunction) {
3754 B(&done); 3767 B(&done);
3755 3768
3756 // Non-instance prototype: fetch prototype from constructor field in initial 3769 // Non-instance prototype: fetch prototype from constructor field in initial
3757 // map. 3770 // map.
3758 Bind(&non_instance); 3771 Bind(&non_instance);
3759 Ldr(result, FieldMemOperand(result, Map::kConstructorOffset)); 3772 Ldr(result, FieldMemOperand(result, Map::kConstructorOrBackPointerOffset));
3760 } 3773 }
3761 3774
3762 // All done. 3775 // All done.
3763 Bind(&done); 3776 Bind(&done);
3764 } 3777 }
3765 3778
3766 3779
3767 void MacroAssembler::CompareRoot(const Register& obj, 3780 void MacroAssembler::CompareRoot(const Register& obj,
3768 Heap::RootListIndex index) { 3781 Heap::RootListIndex index) {
3769 UseScratchRegisterScope temps(this); 3782 UseScratchRegisterScope temps(this);
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
5261 } 5274 }
5262 } 5275 }
5263 5276
5264 5277
5265 #undef __ 5278 #undef __
5266 5279
5267 5280
5268 } } // namespace v8::internal 5281 } } // namespace v8::internal
5269 5282
5270 #endif // V8_TARGET_ARCH_ARM64 5283 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/bootstrapper.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698