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

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

Issue 1516433005: [contexts] Place the initial JSArray maps on the native context directly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 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
« no previous file with comments | « src/isolate.cc ('k') | src/mips64/macro-assembler-mips64.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 1
2 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Copyright 2012 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 4685 matching lines...) Expand 10 before | Expand all | Expand 10 after
4696 } 4696 }
4697 } 4697 }
4698 4698
4699 4699
4700 void MacroAssembler::LoadTransitionedArrayMapConditional( 4700 void MacroAssembler::LoadTransitionedArrayMapConditional(
4701 ElementsKind expected_kind, 4701 ElementsKind expected_kind,
4702 ElementsKind transitioned_kind, 4702 ElementsKind transitioned_kind,
4703 Register map_in_out, 4703 Register map_in_out,
4704 Register scratch, 4704 Register scratch,
4705 Label* no_map_match) { 4705 Label* no_map_match) {
4706 DCHECK(IsFastElementsKind(expected_kind));
4707 DCHECK(IsFastElementsKind(transitioned_kind));
4708
4706 // Check that the function's map is the same as the expected cached map. 4709 // Check that the function's map is the same as the expected cached map.
4707 LoadNativeContextSlot(Context::JS_ARRAY_MAPS_INDEX, scratch); 4710 lw(scratch, NativeContextMemOperand());
4708 size_t offset = expected_kind * kPointerSize + 4711 lw(at, ContextMemOperand(scratch, Context::ArrayMapIndex(expected_kind)));
4709 FixedArrayBase::kHeaderSize;
4710 lw(at, FieldMemOperand(scratch, offset));
4711 Branch(no_map_match, ne, map_in_out, Operand(at)); 4712 Branch(no_map_match, ne, map_in_out, Operand(at));
4712 4713
4713 // Use the transitioned cached map. 4714 // Use the transitioned cached map.
4714 offset = transitioned_kind * kPointerSize + 4715 lw(map_in_out,
4715 FixedArrayBase::kHeaderSize; 4716 ContextMemOperand(scratch, Context::ArrayMapIndex(transitioned_kind)));
4716 lw(map_in_out, FieldMemOperand(scratch, offset));
4717 } 4717 }
4718 4718
4719 4719
4720 void MacroAssembler::LoadNativeContextSlot(int index, Register dst) { 4720 void MacroAssembler::LoadNativeContextSlot(int index, Register dst) {
4721 lw(dst, NativeContextMemOperand()); 4721 lw(dst, NativeContextMemOperand());
4722 lw(dst, ContextMemOperand(dst, index)); 4722 lw(dst, ContextMemOperand(dst, index));
4723 } 4723 }
4724 4724
4725 4725
4726 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, 4726 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
5863 if (mag.shift > 0) sra(result, result, mag.shift); 5863 if (mag.shift > 0) sra(result, result, mag.shift);
5864 srl(at, dividend, 31); 5864 srl(at, dividend, 31);
5865 Addu(result, result, Operand(at)); 5865 Addu(result, result, Operand(at));
5866 } 5866 }
5867 5867
5868 5868
5869 } // namespace internal 5869 } // namespace internal
5870 } // namespace v8 5870 } // namespace v8
5871 5871
5872 #endif // V8_TARGET_ARCH_MIPS 5872 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698