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

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

Issue 1636013002: Replace HeapType with a non-templated FieldType class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tracing of generalizations Created 4 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
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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 DCHECK(!map_reg.is(scratch)); 434 DCHECK(!map_reg.is(scratch));
435 DCHECK(!map_reg.is(value_reg)); 435 DCHECK(!map_reg.is(value_reg));
436 DCHECK(!value_reg.is(scratch)); 436 DCHECK(!value_reg.is(scratch));
437 __ LoadInstanceDescriptors(map_reg, scratch); 437 __ LoadInstanceDescriptors(map_reg, scratch);
438 __ Ldr(scratch, 438 __ Ldr(scratch,
439 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); 439 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor)));
440 __ Cmp(value_reg, scratch); 440 __ Cmp(value_reg, scratch);
441 __ B(ne, miss_label); 441 __ B(ne, miss_label);
442 } 442 }
443 443
444 444 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
445 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
446 Register value_reg, 445 Register value_reg,
447 Label* miss_label) { 446 Label* miss_label) {
448 Register map_reg = scratch1(); 447 Register map_reg = scratch1();
449 Register scratch = scratch2(); 448 Register scratch = scratch2();
450 DCHECK(!value_reg.is(map_reg)); 449 DCHECK(!value_reg.is(map_reg));
451 DCHECK(!value_reg.is(scratch)); 450 DCHECK(!value_reg.is(scratch));
452 __ JumpIfSmi(value_reg, miss_label); 451 __ JumpIfSmi(value_reg, miss_label);
453 HeapType::Iterator<Map> it = field_type->Classes(); 452 FieldType::Iterator it = field_type->Classes();
454 if (!it.Done()) { 453 if (!it.Done()) {
455 __ Ldr(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); 454 __ Ldr(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset));
456 Label do_store; 455 Label do_store;
457 while (true) { 456 while (true) {
458 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); 457 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch);
459 it.Advance(); 458 it.Advance();
460 if (it.Done()) { 459 if (it.Done()) {
461 __ B(ne, miss_label); 460 __ B(ne, miss_label);
462 break; 461 break;
463 } 462 }
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 // Return the generated code. 794 // Return the generated code.
796 return GetCode(kind(), Code::FAST, name); 795 return GetCode(kind(), Code::FAST, name);
797 } 796 }
798 797
799 798
800 #undef __ 799 #undef __
801 } // namespace internal 800 } // namespace internal
802 } // namespace v8 801 } // namespace v8
803 802
804 #endif // V8_TARGET_ARCH_IA32 803 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698