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

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

Issue 1633213003: Remove FieldType::Iterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup 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
« no previous file with comments | « src/ic/ppc/handler-compiler-ppc.cc ('k') | src/ic/x87/handler-compiler-x87.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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 396 }
397 397
398 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type, 398 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
399 Register value_reg, 399 Register value_reg,
400 Label* miss_label) { 400 Label* miss_label) {
401 Register map_reg = scratch1(); 401 Register map_reg = scratch1();
402 Register scratch = scratch2(); 402 Register scratch = scratch2();
403 DCHECK(!value_reg.is(map_reg)); 403 DCHECK(!value_reg.is(map_reg));
404 DCHECK(!value_reg.is(scratch)); 404 DCHECK(!value_reg.is(scratch));
405 __ JumpIfSmi(value_reg, miss_label); 405 __ JumpIfSmi(value_reg, miss_label);
406 FieldType::Iterator it = field_type->Classes(); 406 if (field_type->IsClass()) {
407 if (!it.Done()) {
408 Label do_store; 407 Label do_store;
409 __ movp(map_reg, FieldOperand(value_reg, HeapObject::kMapOffset)); 408 __ movp(map_reg, FieldOperand(value_reg, HeapObject::kMapOffset));
410 while (true) { 409 __ CmpWeakValue(map_reg, Map::WeakCellForMap(field_type->AsClass()),
411 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); 410 scratch);
412 it.Advance(); 411 __ j(not_equal, miss_label);
413 if (it.Done()) {
414 __ j(not_equal, miss_label);
415 break;
416 }
417 __ j(equal, &do_store, Label::kNear);
418 }
419 __ bind(&do_store);
420 } 412 }
421 } 413 }
422 414
423 415
424 Register PropertyHandlerCompiler::CheckPrototypes( 416 Register PropertyHandlerCompiler::CheckPrototypes(
425 Register object_reg, Register holder_reg, Register scratch1, 417 Register object_reg, Register holder_reg, Register scratch1,
426 Register scratch2, Handle<Name> name, Label* miss, PrototypeCheckType check, 418 Register scratch2, Handle<Name> name, Label* miss, PrototypeCheckType check,
427 ReturnHolder return_what) { 419 ReturnHolder return_what) {
428 Handle<Map> receiver_map = map(); 420 Handle<Map> receiver_map = map();
429 421
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 // Return the generated code. 800 // Return the generated code.
809 return GetCode(kind(), Code::NORMAL, name); 801 return GetCode(kind(), Code::NORMAL, name);
810 } 802 }
811 803
812 804
813 #undef __ 805 #undef __
814 } // namespace internal 806 } // namespace internal
815 } // namespace v8 807 } // namespace v8
816 808
817 #endif // V8_TARGET_ARCH_X64 809 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/ppc/handler-compiler-ppc.cc ('k') | src/ic/x87/handler-compiler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698