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

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

Issue 1228063004: Fix keyed element access wrt string wrappers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/macro-assembler-ia32.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 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 4379 matching lines...) Expand 10 before | Expand all | Expand 10 after
4390 HasColor(object, scratch0, scratch1, on_black, 1, 0); // kBlackBitPattern. 4390 HasColor(object, scratch0, scratch1, on_black, 1, 0); // kBlackBitPattern.
4391 } 4391 }
4392 4392
4393 4393
4394 void MacroAssembler::JumpIfDictionaryInPrototypeChain( 4394 void MacroAssembler::JumpIfDictionaryInPrototypeChain(
4395 Register object, 4395 Register object,
4396 Register scratch0, 4396 Register scratch0,
4397 Register scratch1, 4397 Register scratch1,
4398 Label* found) { 4398 Label* found) {
4399 DCHECK(!AreAliased(object, scratch0, scratch1)); 4399 DCHECK(!AreAliased(object, scratch0, scratch1));
4400 Factory* factory = isolate()->factory();
4401 Register current = scratch0; 4400 Register current = scratch0;
4402 Label loop_again; 4401 Label loop_again, end;
4403 4402
4404 // Scratch contains elements pointer. 4403 // Scratch contains elements pointer.
4405 Mov(current, object); 4404 Mov(current, object);
4405 Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset));
4406 Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset));
4407 CompareAndBranch(current, Heap::kNullValueRootIndex, eq, &end);
4406 4408
4407 // Loop based on the map going up the prototype chain. 4409 // Loop based on the map going up the prototype chain.
4408 Bind(&loop_again); 4410 Bind(&loop_again);
4409 Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset)); 4411 Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset));
4412 STATIC_ASSERT(JS_PROXY_TYPE < JS_OBJECT_TYPE);
4413 STATIC_ASSERT(JS_VALUE_TYPE < JS_OBJECT_TYPE);
4414 CompareInstanceType(current, scratch1, JS_OBJECT_TYPE);
4415 B(lo, found);
4410 Ldrb(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); 4416 Ldrb(scratch1, FieldMemOperand(current, Map::kBitField2Offset));
4411 DecodeField<Map::ElementsKindBits>(scratch1); 4417 DecodeField<Map::ElementsKindBits>(scratch1);
4412 CompareAndBranch(scratch1, DICTIONARY_ELEMENTS, eq, found); 4418 CompareAndBranch(scratch1, DICTIONARY_ELEMENTS, eq, found);
4413 Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset)); 4419 Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset));
4414 CompareAndBranch(current, Operand(factory->null_value()), ne, &loop_again); 4420 CompareAndBranch(current, Heap::kNullValueRootIndex, ne, &loop_again);
4421
4422 Bind(&end);
4415 } 4423 }
4416 4424
4417 4425
4418 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, 4426 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location,
4419 Register result) { 4427 Register result) {
4420 DCHECK(!result.Is(ldr_location)); 4428 DCHECK(!result.Is(ldr_location));
4421 const uint32_t kLdrLitOffset_lsb = 5; 4429 const uint32_t kLdrLitOffset_lsb = 5;
4422 const uint32_t kLdrLitOffset_width = 19; 4430 const uint32_t kLdrLitOffset_width = 19;
4423 Ldr(result, MemOperand(ldr_location)); 4431 Ldr(result, MemOperand(ldr_location));
4424 if (emit_debug_code()) { 4432 if (emit_debug_code()) {
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
5129 } 5137 }
5130 5138
5131 5139
5132 #undef __ 5140 #undef __
5133 5141
5134 5142
5135 } // namespace internal 5143 } // namespace internal
5136 } // namespace v8 5144 } // namespace v8
5137 5145
5138 #endif // V8_TARGET_ARCH_ARM64 5146 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698