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

Side by Side Diff: src/ic/arm/handler-compiler-arm.cc

Issue 853713002: Make map check in NamedStoreHandlerCompiler::GenerateFieldTypeChecks weak. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips64 Created 5 years, 11 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 | « no previous file | src/ic/arm64/handler-compiler-arm64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 __ ldr(scratch, 370 __ ldr(scratch,
371 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); 371 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor)));
372 __ cmp(value_reg, scratch); 372 __ cmp(value_reg, scratch);
373 __ b(ne, miss_label); 373 __ b(ne, miss_label);
374 } 374 }
375 375
376 376
377 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, 377 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
378 Register value_reg, 378 Register value_reg,
379 Label* miss_label) { 379 Label* miss_label) {
380 Register map_reg = scratch1();
381 Register scratch = scratch2();
382 DCHECK(!value_reg.is(map_reg));
383 DCHECK(!value_reg.is(scratch));
380 __ JumpIfSmi(value_reg, miss_label); 384 __ JumpIfSmi(value_reg, miss_label);
381 HeapType::Iterator<Map> it = field_type->Classes(); 385 HeapType::Iterator<Map> it = field_type->Classes();
382 if (!it.Done()) { 386 if (!it.Done()) {
383 __ ldr(scratch1(), FieldMemOperand(value_reg, HeapObject::kMapOffset)); 387 __ ldr(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset));
384 Label do_store; 388 Label do_store;
385 while (true) { 389 while (true) {
386 __ CompareMap(scratch1(), it.Current(), &do_store); 390 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch);
387 it.Advance(); 391 it.Advance();
388 if (it.Done()) { 392 if (it.Done()) {
389 __ b(ne, miss_label); 393 __ b(ne, miss_label);
390 break; 394 break;
391 } 395 }
392 __ b(eq, &do_store); 396 __ b(eq, &do_store);
393 } 397 }
394 __ bind(&do_store); 398 __ bind(&do_store);
395 } 399 }
396 } 400 }
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 // Return the generated code. 731 // Return the generated code.
728 return GetCode(kind(), Code::NORMAL, name); 732 return GetCode(kind(), Code::NORMAL, name);
729 } 733 }
730 734
731 735
732 #undef __ 736 #undef __
733 } 737 }
734 } // namespace v8::internal 738 } // namespace v8::internal
735 739
736 #endif // V8_TARGET_ARCH_ARM 740 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698