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

Side by Side Diff: src/ic/arm/handler-compiler-arm.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/crankshaft/hydrogen.cc ('k') | src/ic/arm64/handler-compiler-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 396
397 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type, 397 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
398 Register value_reg, 398 Register value_reg,
399 Label* miss_label) { 399 Label* miss_label) {
400 Register map_reg = scratch1(); 400 Register map_reg = scratch1();
401 Register scratch = scratch2(); 401 Register scratch = scratch2();
402 DCHECK(!value_reg.is(map_reg)); 402 DCHECK(!value_reg.is(map_reg));
403 DCHECK(!value_reg.is(scratch)); 403 DCHECK(!value_reg.is(scratch));
404 __ JumpIfSmi(value_reg, miss_label); 404 __ JumpIfSmi(value_reg, miss_label);
405 FieldType::Iterator it = field_type->Classes(); 405 if (field_type->IsClass()) {
406 if (!it.Done()) {
407 __ ldr(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); 406 __ ldr(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset));
408 Label do_store; 407 __ CmpWeakValue(map_reg, Map::WeakCellForMap(field_type->AsClass()),
409 while (true) { 408 scratch);
410 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); 409 __ b(ne, miss_label);
411 it.Advance();
412 if (it.Done()) {
413 __ b(ne, miss_label);
414 break;
415 }
416 __ b(eq, &do_store);
417 }
418 __ bind(&do_store);
419 } 410 }
420 } 411 }
421 412
422 413
423 Register PropertyHandlerCompiler::CheckPrototypes( 414 Register PropertyHandlerCompiler::CheckPrototypes(
424 Register object_reg, Register holder_reg, Register scratch1, 415 Register object_reg, Register holder_reg, Register scratch1,
425 Register scratch2, Handle<Name> name, Label* miss, PrototypeCheckType check, 416 Register scratch2, Handle<Name> name, Label* miss, PrototypeCheckType check,
426 ReturnHolder return_what) { 417 ReturnHolder return_what) {
427 Handle<Map> receiver_map = map(); 418 Handle<Map> receiver_map = map();
428 419
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 // Return the generated code. 783 // Return the generated code.
793 return GetCode(kind(), Code::NORMAL, name); 784 return GetCode(kind(), Code::NORMAL, name);
794 } 785 }
795 786
796 787
797 #undef __ 788 #undef __
798 } // namespace internal 789 } // namespace internal
799 } // namespace v8 790 } // namespace v8
800 791
801 #endif // V8_TARGET_ARCH_ARM 792 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698