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

Side by Side Diff: src/ic/ppc/handler-compiler-ppc.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, 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 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 DCHECK(!map_reg.is(scratch)); 386 DCHECK(!map_reg.is(scratch));
387 DCHECK(!map_reg.is(value_reg)); 387 DCHECK(!map_reg.is(value_reg));
388 DCHECK(!value_reg.is(scratch)); 388 DCHECK(!value_reg.is(scratch));
389 __ LoadInstanceDescriptors(map_reg, scratch); 389 __ LoadInstanceDescriptors(map_reg, scratch);
390 __ LoadP(scratch, FieldMemOperand( 390 __ LoadP(scratch, FieldMemOperand(
391 scratch, DescriptorArray::GetValueOffset(descriptor))); 391 scratch, DescriptorArray::GetValueOffset(descriptor)));
392 __ cmp(value_reg, scratch); 392 __ cmp(value_reg, scratch);
393 __ bne(miss_label); 393 __ bne(miss_label);
394 } 394 }
395 395
396 396 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
397 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
398 Register value_reg, 397 Register value_reg,
399 Label* miss_label) { 398 Label* miss_label) {
400 Register map_reg = scratch1(); 399 Register map_reg = scratch1();
401 Register scratch = scratch2(); 400 Register scratch = scratch2();
402 DCHECK(!value_reg.is(map_reg)); 401 DCHECK(!value_reg.is(map_reg));
403 DCHECK(!value_reg.is(scratch)); 402 DCHECK(!value_reg.is(scratch));
404 __ JumpIfSmi(value_reg, miss_label); 403 __ JumpIfSmi(value_reg, miss_label);
405 HeapType::Iterator<Map> it = field_type->Classes(); 404 FieldType::Iterator it = field_type->Classes();
406 if (!it.Done()) { 405 if (!it.Done()) {
407 __ LoadP(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); 406 __ LoadP(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset));
408 Label do_store; 407 Label do_store;
409 while (true) { 408 while (true) {
410 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); 409 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch);
411 it.Advance(); 410 it.Advance();
412 if (it.Done()) { 411 if (it.Done()) {
413 __ bne(miss_label); 412 __ bne(miss_label);
414 break; 413 break;
415 } 414 }
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 // Return the generated code. 789 // Return the generated code.
791 return GetCode(kind(), Code::NORMAL, name); 790 return GetCode(kind(), Code::NORMAL, name);
792 } 791 }
793 792
794 793
795 #undef __ 794 #undef __
796 } // namespace internal 795 } // namespace internal
797 } // namespace v8 796 } // namespace v8
798 797
799 #endif // V8_TARGET_ARCH_ARM 798 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698