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

Side by Side Diff: src/ic/arm64/ic-arm64.cc

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 __ Add(backing_store, backing_store, 327 __ Add(backing_store, backing_store,
328 FixedArray::kHeaderSize - kHeapObjectTag); 328 FixedArray::kHeaderSize - kHeapObjectTag);
329 __ SmiUntag(scratch, key); 329 __ SmiUntag(scratch, key);
330 return MemOperand(backing_store, scratch, LSL, kPointerSizeLog2); 330 return MemOperand(backing_store, scratch, LSL, kPointerSizeLog2);
331 } 331 }
332 332
333 333
334 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 334 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
335 // The return address is in lr. 335 // The return address is in lr.
336 Register receiver = LoadConvention::ReceiverRegister(); 336 Register receiver = LoadDescriptor::ReceiverRegister();
337 Register name = LoadConvention::NameRegister(); 337 Register name = LoadDescriptor::NameRegister();
338 DCHECK(receiver.is(x1)); 338 DCHECK(receiver.is(x1));
339 DCHECK(name.is(x2)); 339 DCHECK(name.is(x2));
340 340
341 // Probe the stub cache. 341 // Probe the stub cache.
342 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 342 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
343 Code::ComputeHandlerFlags(Code::LOAD_IC)); 343 Code::ComputeHandlerFlags(Code::LOAD_IC));
344 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3, 344 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3,
345 x4, x5, x6); 345 x4, x5, x6);
346 346
347 // Cache miss: Jump to runtime. 347 // Cache miss: Jump to runtime.
348 GenerateMiss(masm); 348 GenerateMiss(masm);
349 } 349 }
350 350
351 351
352 void LoadIC::GenerateNormal(MacroAssembler* masm) { 352 void LoadIC::GenerateNormal(MacroAssembler* masm) {
353 Register dictionary = x0; 353 Register dictionary = x0;
354 DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); 354 DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
355 DCHECK(!dictionary.is(LoadConvention::NameRegister())); 355 DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
356 Label slow; 356 Label slow;
357 357
358 __ Ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), 358 __ Ldr(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
359 JSObject::kPropertiesOffset)); 359 JSObject::kPropertiesOffset));
360 GenerateDictionaryLoad(masm, &slow, dictionary, 360 GenerateDictionaryLoad(masm, &slow, dictionary,
361 LoadConvention::NameRegister(), x0, x3, x4); 361 LoadDescriptor::NameRegister(), x0, x3, x4);
362 __ Ret(); 362 __ Ret();
363 363
364 // Dictionary load failed, go slow (but don't miss). 364 // Dictionary load failed, go slow (but don't miss).
365 __ Bind(&slow); 365 __ Bind(&slow);
366 GenerateRuntimeGetProperty(masm); 366 GenerateRuntimeGetProperty(masm);
367 } 367 }
368 368
369 369
370 void LoadIC::GenerateMiss(MacroAssembler* masm) { 370 void LoadIC::GenerateMiss(MacroAssembler* masm) {
371 // The return address is in lr. 371 // The return address is in lr.
372 Isolate* isolate = masm->isolate(); 372 Isolate* isolate = masm->isolate();
373 ASM_LOCATION("LoadIC::GenerateMiss"); 373 ASM_LOCATION("LoadIC::GenerateMiss");
374 374
375 __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); 375 __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4);
376 376
377 // Perform tail call to the entry. 377 // Perform tail call to the entry.
378 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 378 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
379 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 379 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
380 __ TailCallExternalReference(ref, 2, 1); 380 __ TailCallExternalReference(ref, 2, 1);
381 } 381 }
382 382
383 383
384 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 384 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
385 // The return address is in lr. 385 // The return address is in lr.
386 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 386 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
387 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 387 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
388 } 388 }
389 389
390 390
391 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { 391 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
392 // The return address is in lr. 392 // The return address is in lr.
393 Register result = x0; 393 Register result = x0;
394 Register receiver = LoadConvention::ReceiverRegister(); 394 Register receiver = LoadDescriptor::ReceiverRegister();
395 Register key = LoadConvention::NameRegister(); 395 Register key = LoadDescriptor::NameRegister();
396 DCHECK(receiver.is(x1)); 396 DCHECK(receiver.is(x1));
397 DCHECK(key.is(x2)); 397 DCHECK(key.is(x2));
398 398
399 Label miss, unmapped; 399 Label miss, unmapped;
400 400
401 Register map_scratch = x0; 401 Register map_scratch = x0;
402 MemOperand mapped_location = GenerateMappedArgumentsLookup( 402 MemOperand mapped_location = GenerateMappedArgumentsLookup(
403 masm, receiver, key, map_scratch, x3, x4, &unmapped, &miss); 403 masm, receiver, key, map_scratch, x3, x4, &unmapped, &miss);
404 __ Ldr(result, mapped_location); 404 __ Ldr(result, mapped_location);
405 __ Ret(); 405 __ Ret();
406 406
407 __ Bind(&unmapped); 407 __ Bind(&unmapped);
408 // Parameter map is left in map_scratch when a jump on unmapped is done. 408 // Parameter map is left in map_scratch when a jump on unmapped is done.
409 MemOperand unmapped_location = 409 MemOperand unmapped_location =
410 GenerateUnmappedArgumentsLookup(masm, key, map_scratch, x3, &miss); 410 GenerateUnmappedArgumentsLookup(masm, key, map_scratch, x3, &miss);
411 __ Ldr(result, unmapped_location); 411 __ Ldr(result, unmapped_location);
412 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss); 412 __ JumpIfRoot(result, Heap::kTheHoleValueRootIndex, &miss);
413 __ Ret(); 413 __ Ret();
414 414
415 __ Bind(&miss); 415 __ Bind(&miss);
416 GenerateMiss(masm); 416 GenerateMiss(masm);
417 } 417 }
418 418
419 419
420 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 420 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
421 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); 421 ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments");
422 Label slow, notin; 422 Label slow, notin;
423 Register value = StoreConvention::ValueRegister(); 423 Register value = StoreDescriptor::ValueRegister();
424 Register key = StoreConvention::NameRegister(); 424 Register key = StoreDescriptor::NameRegister();
425 Register receiver = StoreConvention::ReceiverRegister(); 425 Register receiver = StoreDescriptor::ReceiverRegister();
426 DCHECK(receiver.is(x1)); 426 DCHECK(receiver.is(x1));
427 DCHECK(key.is(x2)); 427 DCHECK(key.is(x2));
428 DCHECK(value.is(x0)); 428 DCHECK(value.is(x0));
429 429
430 Register map = x3; 430 Register map = x3;
431 431
432 // These registers are used by GenerateMappedArgumentsLookup to build a 432 // These registers are used by GenerateMappedArgumentsLookup to build a
433 // MemOperand. They are live for as long as the MemOperand is live. 433 // MemOperand. They are live for as long as the MemOperand is live.
434 Register mapped1 = x4; 434 Register mapped1 = x4;
435 Register mapped2 = x5; 435 Register mapped2 = x5;
(...skipping 26 matching lines...) Expand all
462 GenerateMiss(masm); 462 GenerateMiss(masm);
463 } 463 }
464 464
465 465
466 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 466 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
467 // The return address is in lr. 467 // The return address is in lr.
468 Isolate* isolate = masm->isolate(); 468 Isolate* isolate = masm->isolate();
469 469
470 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); 470 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11);
471 471
472 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 472 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
473 473
474 // Perform tail call to the entry. 474 // Perform tail call to the entry.
475 ExternalReference ref = 475 ExternalReference ref =
476 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 476 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
477 477
478 __ TailCallExternalReference(ref, 2, 1); 478 __ TailCallExternalReference(ref, 2, 1);
479 } 479 }
480 480
481 481
482 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 482 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
483 // The return address is in lr. 483 // The return address is in lr.
484 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 484 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
485 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 485 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
486 } 486 }
487 487
488 488
489 static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, Register key, 489 static void GenerateKeyedLoadWithSmiKey(MacroAssembler* masm, Register key,
490 Register receiver, Register scratch1, 490 Register receiver, Register scratch1,
491 Register scratch2, Register scratch3, 491 Register scratch2, Register scratch3,
492 Register scratch4, Register scratch5, 492 Register scratch4, Register scratch5,
493 Label* slow) { 493 Label* slow) {
494 DCHECK(!AreAliased(key, receiver, scratch1, scratch2, scratch3, scratch4, 494 DCHECK(!AreAliased(key, receiver, scratch1, scratch2, scratch3, scratch4,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 __ IncrementCounter(isolate->counters()->keyed_load_generic_symbol(), 1, 638 __ IncrementCounter(isolate->counters()->keyed_load_generic_symbol(), 1,
639 scratch1, scratch2); 639 scratch1, scratch2);
640 __ Ret(); 640 __ Ret();
641 } 641 }
642 642
643 643
644 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { 644 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
645 // The return address is in lr. 645 // The return address is in lr.
646 Label slow, check_name, index_smi, index_name; 646 Label slow, check_name, index_smi, index_name;
647 647
648 Register key = LoadConvention::NameRegister(); 648 Register key = LoadDescriptor::NameRegister();
649 Register receiver = LoadConvention::ReceiverRegister(); 649 Register receiver = LoadDescriptor::ReceiverRegister();
650 DCHECK(key.is(x2)); 650 DCHECK(key.is(x2));
651 DCHECK(receiver.is(x1)); 651 DCHECK(receiver.is(x1));
652 652
653 __ JumpIfNotSmi(key, &check_name); 653 __ JumpIfNotSmi(key, &check_name);
654 __ Bind(&index_smi); 654 __ Bind(&index_smi);
655 // Now the key is known to be a smi. This place is also jumped to from below 655 // Now the key is known to be a smi. This place is also jumped to from below
656 // where a numeric string is converted to a smi. 656 // where a numeric string is converted to a smi.
657 GenerateKeyedLoadWithSmiKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow); 657 GenerateKeyedLoadWithSmiKey(masm, key, receiver, x7, x3, x4, x5, x6, &slow);
658 658
659 // Slow case. 659 // Slow case.
(...skipping 11 matching lines...) Expand all
671 __ IndexFromHash(x3, key); 671 __ IndexFromHash(x3, key);
672 // Now jump to the place where smi keys are handled. 672 // Now jump to the place where smi keys are handled.
673 __ B(&index_smi); 673 __ B(&index_smi);
674 } 674 }
675 675
676 676
677 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 677 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
678 // Return address is in lr. 678 // Return address is in lr.
679 Label miss; 679 Label miss;
680 680
681 Register receiver = LoadConvention::ReceiverRegister(); 681 Register receiver = LoadDescriptor::ReceiverRegister();
682 Register index = LoadConvention::NameRegister(); 682 Register index = LoadDescriptor::NameRegister();
683 Register result = x0; 683 Register result = x0;
684 Register scratch = x3; 684 Register scratch = x3;
685 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 685 DCHECK(!scratch.is(receiver) && !scratch.is(index));
686 686
687 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 687 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
688 &miss, // When not a string. 688 &miss, // When not a string.
689 &miss, // When not a number. 689 &miss, // When not a number.
690 &miss, // When index out of range. 690 &miss, // When index out of range.
691 STRING_INDEX_IS_ARRAY_INDEX); 691 STRING_INDEX_IS_ARRAY_INDEX);
692 char_at_generator.GenerateFast(masm); 692 char_at_generator.GenerateFast(masm);
693 __ Ret(); 693 __ Ret();
694 694
695 StubRuntimeCallHelper call_helper; 695 StubRuntimeCallHelper call_helper;
696 char_at_generator.GenerateSlow(masm, call_helper); 696 char_at_generator.GenerateSlow(masm, call_helper);
697 697
698 __ Bind(&miss); 698 __ Bind(&miss);
699 GenerateMiss(masm); 699 GenerateMiss(masm);
700 } 700 }
701 701
702 702
703 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { 703 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
704 // Return address is in lr. 704 // Return address is in lr.
705 Label slow; 705 Label slow;
706 706
707 Register receiver = LoadConvention::ReceiverRegister(); 707 Register receiver = LoadDescriptor::ReceiverRegister();
708 Register key = LoadConvention::NameRegister(); 708 Register key = LoadDescriptor::NameRegister();
709 Register scratch1 = x3; 709 Register scratch1 = x3;
710 Register scratch2 = x4; 710 Register scratch2 = x4;
711 DCHECK(!AreAliased(scratch1, scratch2, receiver, key)); 711 DCHECK(!AreAliased(scratch1, scratch2, receiver, key));
712 712
713 // Check that the receiver isn't a smi. 713 // Check that the receiver isn't a smi.
714 __ JumpIfSmi(receiver, &slow); 714 __ JumpIfSmi(receiver, &slow);
715 715
716 // Check that the key is an array index, that is Uint32. 716 // Check that the key is an array index, that is Uint32.
717 __ TestAndBranchIfAnySet(key, kSmiTagMask | kSmiSignMask, &slow); 717 __ TestAndBranchIfAnySet(key, kSmiTagMask | kSmiSignMask, &slow);
718 718
(...skipping 18 matching lines...) Expand all
737 737
738 __ Bind(&slow); 738 __ Bind(&slow);
739 GenerateMiss(masm); 739 GenerateMiss(masm);
740 } 740 }
741 741
742 742
743 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 743 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
744 ASM_LOCATION("KeyedStoreIC::GenerateMiss"); 744 ASM_LOCATION("KeyedStoreIC::GenerateMiss");
745 745
746 // Push receiver, key and value for runtime call. 746 // Push receiver, key and value for runtime call.
747 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 747 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
748 StoreConvention::ValueRegister()); 748 StoreDescriptor::ValueRegister());
749 749
750 ExternalReference ref = 750 ExternalReference ref =
751 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 751 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
752 __ TailCallExternalReference(ref, 3, 1); 752 __ TailCallExternalReference(ref, 3, 1);
753 } 753 }
754 754
755 755
756 static void KeyedStoreGenerateGenericHelper( 756 static void KeyedStoreGenerateGenericHelper(
757 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 757 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
758 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 758 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 StrictMode strict_mode) { 889 StrictMode strict_mode) {
890 ASM_LOCATION("KeyedStoreIC::GenerateGeneric"); 890 ASM_LOCATION("KeyedStoreIC::GenerateGeneric");
891 Label slow; 891 Label slow;
892 Label array; 892 Label array;
893 Label fast_object; 893 Label fast_object;
894 Label extra; 894 Label extra;
895 Label fast_object_grow; 895 Label fast_object_grow;
896 Label fast_double_grow; 896 Label fast_double_grow;
897 Label fast_double; 897 Label fast_double;
898 898
899 Register value = StoreConvention::ValueRegister(); 899 Register value = StoreDescriptor::ValueRegister();
900 Register key = StoreConvention::NameRegister(); 900 Register key = StoreDescriptor::NameRegister();
901 Register receiver = StoreConvention::ReceiverRegister(); 901 Register receiver = StoreDescriptor::ReceiverRegister();
902 DCHECK(receiver.is(x1)); 902 DCHECK(receiver.is(x1));
903 DCHECK(key.is(x2)); 903 DCHECK(key.is(x2));
904 DCHECK(value.is(x0)); 904 DCHECK(value.is(x0));
905 905
906 Register receiver_map = x3; 906 Register receiver_map = x3;
907 Register elements = x4; 907 Register elements = x4;
908 Register elements_map = x5; 908 Register elements_map = x5;
909 909
910 __ JumpIfNotSmi(key, &slow); 910 __ JumpIfNotSmi(key, &slow);
911 __ JumpIfSmi(receiver, &slow); 911 __ JumpIfSmi(receiver, &slow);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 masm, &fast_object, &fast_double, &slow, kCheckMap, kDontIncrementLength, 979 masm, &fast_object, &fast_double, &slow, kCheckMap, kDontIncrementLength,
980 value, key, receiver, receiver_map, elements_map, elements); 980 value, key, receiver, receiver_map, elements_map, elements);
981 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, 981 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow,
982 &slow, kDontCheckMap, kIncrementLength, value, 982 &slow, kDontCheckMap, kIncrementLength, value,
983 key, receiver, receiver_map, elements_map, 983 key, receiver, receiver_map, elements_map,
984 elements); 984 elements);
985 } 985 }
986 986
987 987
988 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 988 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
989 Register receiver = StoreConvention::ReceiverRegister(); 989 Register receiver = StoreDescriptor::ReceiverRegister();
990 Register name = StoreConvention::NameRegister(); 990 Register name = StoreDescriptor::NameRegister();
991 DCHECK(!AreAliased(receiver, name, StoreConvention::ValueRegister(), x3, x4, 991 DCHECK(!AreAliased(receiver, name, StoreDescriptor::ValueRegister(), x3, x4,
992 x5, x6)); 992 x5, x6));
993 993
994 // Probe the stub cache. 994 // Probe the stub cache.
995 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 995 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
996 Code::ComputeHandlerFlags(Code::STORE_IC)); 996 Code::ComputeHandlerFlags(Code::STORE_IC));
997 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3, 997 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, x3,
998 x4, x5, x6); 998 x4, x5, x6);
999 999
1000 // Cache miss: Jump to runtime. 1000 // Cache miss: Jump to runtime.
1001 GenerateMiss(masm); 1001 GenerateMiss(masm);
1002 } 1002 }
1003 1003
1004 1004
1005 void StoreIC::GenerateMiss(MacroAssembler* masm) { 1005 void StoreIC::GenerateMiss(MacroAssembler* masm) {
1006 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 1006 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
1007 StoreConvention::ValueRegister()); 1007 StoreDescriptor::ValueRegister());
1008 1008
1009 // Tail call to the entry. 1009 // Tail call to the entry.
1010 ExternalReference ref = 1010 ExternalReference ref =
1011 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); 1011 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
1012 __ TailCallExternalReference(ref, 3, 1); 1012 __ TailCallExternalReference(ref, 3, 1);
1013 } 1013 }
1014 1014
1015 1015
1016 void StoreIC::GenerateNormal(MacroAssembler* masm) { 1016 void StoreIC::GenerateNormal(MacroAssembler* masm) {
1017 Label miss; 1017 Label miss;
1018 Register value = StoreConvention::ValueRegister(); 1018 Register value = StoreDescriptor::ValueRegister();
1019 Register receiver = StoreConvention::ReceiverRegister(); 1019 Register receiver = StoreDescriptor::ReceiverRegister();
1020 Register name = StoreConvention::NameRegister(); 1020 Register name = StoreDescriptor::NameRegister();
1021 Register dictionary = x3; 1021 Register dictionary = x3;
1022 DCHECK(!AreAliased(value, receiver, name, x3, x4, x5)); 1022 DCHECK(!AreAliased(value, receiver, name, x3, x4, x5));
1023 1023
1024 __ Ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 1024 __ Ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
1025 1025
1026 GenerateDictionaryStore(masm, &miss, dictionary, name, value, x4, x5); 1026 GenerateDictionaryStore(masm, &miss, dictionary, name, value, x4, x5);
1027 Counters* counters = masm->isolate()->counters(); 1027 Counters* counters = masm->isolate()->counters();
1028 __ IncrementCounter(counters->store_normal_hit(), 1, x4, x5); 1028 __ IncrementCounter(counters->store_normal_hit(), 1, x4, x5);
1029 __ Ret(); 1029 __ Ret();
1030 1030
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } else { 1117 } else {
1118 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); 1118 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ);
1119 // This is JumpIfSmi(smi_reg, branch_imm). 1119 // This is JumpIfSmi(smi_reg, branch_imm).
1120 patcher.tbz(smi_reg, 0, branch_imm); 1120 patcher.tbz(smi_reg, 0, branch_imm);
1121 } 1121 }
1122 } 1122 }
1123 } 1123 }
1124 } // namespace v8::internal 1124 } // namespace v8::internal
1125 1125
1126 #endif // V8_TARGET_ARCH_ARM64 1126 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698