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

Side by Side Diff: src/ic/mips/handler-compiler-mips.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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 Label* miss_label) { 376 Label* miss_label) {
377 DCHECK(!map_reg.is(scratch)); 377 DCHECK(!map_reg.is(scratch));
378 DCHECK(!map_reg.is(value_reg)); 378 DCHECK(!map_reg.is(value_reg));
379 DCHECK(!value_reg.is(scratch)); 379 DCHECK(!value_reg.is(scratch));
380 __ LoadInstanceDescriptors(map_reg, scratch); 380 __ LoadInstanceDescriptors(map_reg, scratch);
381 __ lw(scratch, 381 __ lw(scratch,
382 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); 382 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor)));
383 __ Branch(miss_label, ne, value_reg, Operand(scratch)); 383 __ Branch(miss_label, ne, value_reg, Operand(scratch));
384 } 384 }
385 385
386 386 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
387 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
388 Register value_reg, 387 Register value_reg,
389 Label* miss_label) { 388 Label* miss_label) {
390 Register map_reg = scratch1(); 389 Register map_reg = scratch1();
391 Register scratch = scratch2(); 390 Register scratch = scratch2();
392 DCHECK(!value_reg.is(map_reg)); 391 DCHECK(!value_reg.is(map_reg));
393 DCHECK(!value_reg.is(scratch)); 392 DCHECK(!value_reg.is(scratch));
394 __ JumpIfSmi(value_reg, miss_label); 393 __ JumpIfSmi(value_reg, miss_label);
395 HeapType::Iterator<Map> it = field_type->Classes(); 394 FieldType::Iterator it = field_type->Classes();
396 if (!it.Done()) { 395 if (!it.Done()) {
397 __ lw(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); 396 __ lw(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset));
398 Label do_store; 397 Label do_store;
399 while (true) { 398 while (true) {
400 // Compare map directly within the Branch() functions. 399 // Compare map directly within the Branch() functions.
401 __ GetWeakValue(scratch, Map::WeakCellForMap(it.Current())); 400 __ GetWeakValue(scratch, Map::WeakCellForMap(it.Current()));
402 it.Advance(); 401 it.Advance();
403 if (it.Done()) { 402 if (it.Done()) {
404 __ Branch(miss_label, ne, map_reg, Operand(scratch)); 403 __ Branch(miss_label, ne, map_reg, Operand(scratch));
405 break; 404 break;
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // Return the generated code. 790 // Return the generated code.
792 return GetCode(kind(), Code::NORMAL, name); 791 return GetCode(kind(), Code::NORMAL, name);
793 } 792 }
794 793
795 794
796 #undef __ 795 #undef __
797 } // namespace internal 796 } // namespace internal
798 } // namespace v8 797 } // namespace v8
799 798
800 #endif // V8_TARGET_ARCH_MIPS 799 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« src/ic/ic.cc ('K') | « src/ic/ic.cc ('k') | src/ic/mips64/handler-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698