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

Side by Side Diff: src/ic/x87/handler-compiler-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 5 #if V8_TARGET_ARCH_X87
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 DCHECK(!map_reg.is(scratch)); 392 DCHECK(!map_reg.is(scratch));
393 DCHECK(!map_reg.is(value_reg)); 393 DCHECK(!map_reg.is(value_reg));
394 DCHECK(!value_reg.is(scratch)); 394 DCHECK(!value_reg.is(scratch));
395 __ LoadInstanceDescriptors(map_reg, scratch); 395 __ LoadInstanceDescriptors(map_reg, scratch);
396 __ mov(scratch, 396 __ mov(scratch,
397 FieldOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); 397 FieldOperand(scratch, DescriptorArray::GetValueOffset(descriptor)));
398 __ cmp(value_reg, scratch); 398 __ cmp(value_reg, scratch);
399 __ j(not_equal, miss_label); 399 __ j(not_equal, miss_label);
400 } 400 }
401 401
402 402 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
403 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type,
404 Register value_reg, 403 Register value_reg,
405 Label* miss_label) { 404 Label* miss_label) {
406 Register map_reg = scratch1(); 405 Register map_reg = scratch1();
407 Register scratch = scratch2(); 406 Register scratch = scratch2();
408 DCHECK(!value_reg.is(map_reg)); 407 DCHECK(!value_reg.is(map_reg));
409 DCHECK(!value_reg.is(scratch)); 408 DCHECK(!value_reg.is(scratch));
410 __ JumpIfSmi(value_reg, miss_label); 409 __ JumpIfSmi(value_reg, miss_label);
411 HeapType::Iterator<Map> it = field_type->Classes(); 410 FieldType::Iterator it = field_type->Classes();
412 if (!it.Done()) { 411 if (!it.Done()) {
413 Label do_store; 412 Label do_store;
414 __ mov(map_reg, FieldOperand(value_reg, HeapObject::kMapOffset)); 413 __ mov(map_reg, FieldOperand(value_reg, HeapObject::kMapOffset));
415 while (true) { 414 while (true) {
416 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); 415 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch);
417 it.Advance(); 416 it.Advance();
418 if (it.Done()) { 417 if (it.Done()) {
419 __ j(not_equal, miss_label); 418 __ j(not_equal, miss_label);
420 break; 419 break;
421 } 420 }
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 // Return the generated code. 816 // Return the generated code.
818 return GetCode(kind(), Code::NORMAL, name); 817 return GetCode(kind(), Code::NORMAL, name);
819 } 818 }
820 819
821 820
822 #undef __ 821 #undef __
823 } // namespace internal 822 } // namespace internal
824 } // namespace v8 823 } // namespace v8
825 824
826 #endif // V8_TARGET_ARCH_X87 825 #endif // V8_TARGET_ARCH_X87
OLDNEW
« src/ic/ic.cc ('K') | « src/ic/x64/handler-compiler-x64.cc ('k') | src/list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698