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

Side by Side Diff: src/ic/arm/ic-arm.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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 STATIC_ASSERT(kInternalizedTag == 0); 237 STATIC_ASSERT(kInternalizedTag == 0);
238 __ tst(hash, Operand(kIsNotInternalizedMask)); 238 __ tst(hash, Operand(kIsNotInternalizedMask));
239 __ b(ne, not_unique); 239 __ b(ne, not_unique);
240 240
241 __ bind(&unique); 241 __ bind(&unique);
242 } 242 }
243 243
244 244
245 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 245 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
246 // The return address is in lr. 246 // The return address is in lr.
247 Register receiver = LoadConvention::ReceiverRegister(); 247 Register receiver = LoadDescriptor::ReceiverRegister();
248 Register name = LoadConvention::NameRegister(); 248 Register name = LoadDescriptor::NameRegister();
249 DCHECK(receiver.is(r1)); 249 DCHECK(receiver.is(r1));
250 DCHECK(name.is(r2)); 250 DCHECK(name.is(r2));
251 251
252 // Probe the stub cache. 252 // Probe the stub cache.
253 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 253 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
254 Code::ComputeHandlerFlags(Code::LOAD_IC)); 254 Code::ComputeHandlerFlags(Code::LOAD_IC));
255 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, r3, 255 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, r3,
256 r4, r5, r6); 256 r4, r5, r6);
257 257
258 // Cache miss: Jump to runtime. 258 // Cache miss: Jump to runtime.
259 GenerateMiss(masm); 259 GenerateMiss(masm);
260 } 260 }
261 261
262 262
263 void LoadIC::GenerateNormal(MacroAssembler* masm) { 263 void LoadIC::GenerateNormal(MacroAssembler* masm) {
264 Register dictionary = r0; 264 Register dictionary = r0;
265 DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); 265 DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
266 DCHECK(!dictionary.is(LoadConvention::NameRegister())); 266 DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
267 267
268 Label slow; 268 Label slow;
269 269
270 __ ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), 270 __ ldr(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
271 JSObject::kPropertiesOffset)); 271 JSObject::kPropertiesOffset));
272 GenerateDictionaryLoad(masm, &slow, dictionary, 272 GenerateDictionaryLoad(masm, &slow, dictionary,
273 LoadConvention::NameRegister(), r0, r3, r4); 273 LoadDescriptor::NameRegister(), r0, r3, r4);
274 __ Ret(); 274 __ Ret();
275 275
276 // Dictionary load failed, go slow (but don't miss). 276 // Dictionary load failed, go slow (but don't miss).
277 __ bind(&slow); 277 __ bind(&slow);
278 GenerateRuntimeGetProperty(masm); 278 GenerateRuntimeGetProperty(masm);
279 } 279 }
280 280
281 281
282 // A register that isn't one of the parameters to the load ic. 282 // A register that isn't one of the parameters to the load ic.
283 static const Register LoadIC_TempRegister() { return r3; } 283 static const Register LoadIC_TempRegister() { return r3; }
284 284
285 285
286 void LoadIC::GenerateMiss(MacroAssembler* masm) { 286 void LoadIC::GenerateMiss(MacroAssembler* masm) {
287 // The return address is in lr. 287 // The return address is in lr.
288 Isolate* isolate = masm->isolate(); 288 Isolate* isolate = masm->isolate();
289 289
290 __ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4); 290 __ IncrementCounter(isolate->counters()->load_miss(), 1, r3, r4);
291 291
292 __ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister()); 292 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
293 __ Push(LoadIC_TempRegister(), LoadConvention::NameRegister()); 293 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
294 294
295 // Perform tail call to the entry. 295 // Perform tail call to the entry.
296 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 296 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
297 __ TailCallExternalReference(ref, 2, 1); 297 __ TailCallExternalReference(ref, 2, 1);
298 } 298 }
299 299
300 300
301 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 301 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
302 // The return address is in lr. 302 // The return address is in lr.
303 303
304 __ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister()); 304 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
305 __ Push(LoadIC_TempRegister(), LoadConvention::NameRegister()); 305 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
306 306
307 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 307 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
308 } 308 }
309 309
310 310
311 static MemOperand GenerateMappedArgumentsLookup( 311 static MemOperand GenerateMappedArgumentsLookup(
312 MacroAssembler* masm, Register object, Register key, Register scratch1, 312 MacroAssembler* masm, Register object, Register key, Register scratch1,
313 Register scratch2, Register scratch3, Label* unmapped_case, 313 Register scratch2, Register scratch3, Label* unmapped_case,
314 Label* slow_case) { 314 Label* slow_case) {
315 Heap* heap = masm->isolate()->heap(); 315 Heap* heap = masm->isolate()->heap();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 __ b(cs, slow_case); 382 __ b(cs, slow_case);
383 __ mov(scratch, Operand(kPointerSize >> 1)); 383 __ mov(scratch, Operand(kPointerSize >> 1));
384 __ mul(scratch, key, scratch); 384 __ mul(scratch, key, scratch);
385 __ add(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 385 __ add(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
386 return MemOperand(backing_store, scratch); 386 return MemOperand(backing_store, scratch);
387 } 387 }
388 388
389 389
390 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { 390 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
391 // The return address is in lr. 391 // The return address is in lr.
392 Register receiver = LoadConvention::ReceiverRegister(); 392 Register receiver = LoadDescriptor::ReceiverRegister();
393 Register key = LoadConvention::NameRegister(); 393 Register key = LoadDescriptor::NameRegister();
394 DCHECK(receiver.is(r1)); 394 DCHECK(receiver.is(r1));
395 DCHECK(key.is(r2)); 395 DCHECK(key.is(r2));
396 396
397 Label slow, notin; 397 Label slow, notin;
398 MemOperand mapped_location = GenerateMappedArgumentsLookup( 398 MemOperand mapped_location = GenerateMappedArgumentsLookup(
399 masm, receiver, key, r0, r3, r4, &notin, &slow); 399 masm, receiver, key, r0, r3, r4, &notin, &slow);
400 __ ldr(r0, mapped_location); 400 __ ldr(r0, mapped_location);
401 __ Ret(); 401 __ Ret();
402 __ bind(&notin); 402 __ bind(&notin);
403 // The unmapped lookup expects that the parameter map is in r0. 403 // The unmapped lookup expects that the parameter map is in r0.
404 MemOperand unmapped_location = 404 MemOperand unmapped_location =
405 GenerateUnmappedArgumentsLookup(masm, key, r0, r3, &slow); 405 GenerateUnmappedArgumentsLookup(masm, key, r0, r3, &slow);
406 __ ldr(r0, unmapped_location); 406 __ ldr(r0, unmapped_location);
407 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); 407 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
408 __ cmp(r0, r3); 408 __ cmp(r0, r3);
409 __ b(eq, &slow); 409 __ b(eq, &slow);
410 __ Ret(); 410 __ Ret();
411 __ bind(&slow); 411 __ bind(&slow);
412 GenerateMiss(masm); 412 GenerateMiss(masm);
413 } 413 }
414 414
415 415
416 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 416 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
417 Register receiver = StoreConvention::ReceiverRegister(); 417 Register receiver = StoreDescriptor::ReceiverRegister();
418 Register key = StoreConvention::NameRegister(); 418 Register key = StoreDescriptor::NameRegister();
419 Register value = StoreConvention::ValueRegister(); 419 Register value = StoreDescriptor::ValueRegister();
420 DCHECK(receiver.is(r1)); 420 DCHECK(receiver.is(r1));
421 DCHECK(key.is(r2)); 421 DCHECK(key.is(r2));
422 DCHECK(value.is(r0)); 422 DCHECK(value.is(r0));
423 423
424 Label slow, notin; 424 Label slow, notin;
425 MemOperand mapped_location = GenerateMappedArgumentsLookup( 425 MemOperand mapped_location = GenerateMappedArgumentsLookup(
426 masm, receiver, key, r3, r4, r5, &notin, &slow); 426 masm, receiver, key, r3, r4, r5, &notin, &slow);
427 __ str(value, mapped_location); 427 __ str(value, mapped_location);
428 __ add(r6, r3, r5); 428 __ add(r6, r3, r5);
429 __ mov(r9, value); 429 __ mov(r9, value);
(...skipping 12 matching lines...) Expand all
442 GenerateMiss(masm); 442 GenerateMiss(masm);
443 } 443 }
444 444
445 445
446 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 446 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
447 // The return address is in lr. 447 // The return address is in lr.
448 Isolate* isolate = masm->isolate(); 448 Isolate* isolate = masm->isolate();
449 449
450 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4); 450 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, r3, r4);
451 451
452 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 452 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
453 453
454 // Perform tail call to the entry. 454 // Perform tail call to the entry.
455 ExternalReference ref = 455 ExternalReference ref =
456 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 456 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
457 457
458 __ TailCallExternalReference(ref, 2, 1); 458 __ TailCallExternalReference(ref, 2, 1);
459 } 459 }
460 460
461 461
462 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 462 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
463 // The return address is in lr. 463 // The return address is in lr.
464 464
465 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 465 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
466 466
467 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 467 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
468 } 468 }
469 469
470 470
471 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { 471 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
472 // The return address is in lr. 472 // The return address is in lr.
473 Label slow, check_name, index_smi, index_name, property_array_property; 473 Label slow, check_name, index_smi, index_name, property_array_property;
474 Label probe_dictionary, check_number_dictionary; 474 Label probe_dictionary, check_number_dictionary;
475 475
476 Register key = LoadConvention::NameRegister(); 476 Register key = LoadDescriptor::NameRegister();
477 Register receiver = LoadConvention::ReceiverRegister(); 477 Register receiver = LoadDescriptor::ReceiverRegister();
478 DCHECK(key.is(r2)); 478 DCHECK(key.is(r2));
479 DCHECK(receiver.is(r1)); 479 DCHECK(receiver.is(r1));
480 480
481 Isolate* isolate = masm->isolate(); 481 Isolate* isolate = masm->isolate();
482 482
483 // Check that the key is a smi. 483 // Check that the key is a smi.
484 __ JumpIfNotSmi(key, &check_name); 484 __ JumpIfNotSmi(key, &check_name);
485 __ bind(&index_smi); 485 __ bind(&index_smi);
486 // Now the key is known to be a smi. This place is also jumped to from below 486 // Now the key is known to be a smi. This place is also jumped to from below
487 // where a numeric string is converted to a smi. 487 // where a numeric string is converted to a smi.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 __ IndexFromHash(r3, key); 628 __ IndexFromHash(r3, key);
629 // Now jump to the place where smi keys are handled. 629 // Now jump to the place where smi keys are handled.
630 __ jmp(&index_smi); 630 __ jmp(&index_smi);
631 } 631 }
632 632
633 633
634 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 634 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
635 // Return address is in lr. 635 // Return address is in lr.
636 Label miss; 636 Label miss;
637 637
638 Register receiver = LoadConvention::ReceiverRegister(); 638 Register receiver = LoadDescriptor::ReceiverRegister();
639 Register index = LoadConvention::NameRegister(); 639 Register index = LoadDescriptor::NameRegister();
640 Register scratch = r3; 640 Register scratch = r3;
641 Register result = r0; 641 Register result = r0;
642 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 642 DCHECK(!scratch.is(receiver) && !scratch.is(index));
643 643
644 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 644 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
645 &miss, // When not a string. 645 &miss, // When not a string.
646 &miss, // When not a number. 646 &miss, // When not a number.
647 &miss, // When index out of range. 647 &miss, // When index out of range.
648 STRING_INDEX_IS_ARRAY_INDEX); 648 STRING_INDEX_IS_ARRAY_INDEX);
649 char_at_generator.GenerateFast(masm); 649 char_at_generator.GenerateFast(masm);
650 __ Ret(); 650 __ Ret();
651 651
652 StubRuntimeCallHelper call_helper; 652 StubRuntimeCallHelper call_helper;
653 char_at_generator.GenerateSlow(masm, call_helper); 653 char_at_generator.GenerateSlow(masm, call_helper);
654 654
655 __ bind(&miss); 655 __ bind(&miss);
656 GenerateMiss(masm); 656 GenerateMiss(masm);
657 } 657 }
658 658
659 659
660 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { 660 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
661 // Return address is in lr. 661 // Return address is in lr.
662 Label slow; 662 Label slow;
663 663
664 Register receiver = LoadConvention::ReceiverRegister(); 664 Register receiver = LoadDescriptor::ReceiverRegister();
665 Register key = LoadConvention::NameRegister(); 665 Register key = LoadDescriptor::NameRegister();
666 Register scratch1 = r3; 666 Register scratch1 = r3;
667 Register scratch2 = r4; 667 Register scratch2 = r4;
668 DCHECK(!scratch1.is(receiver) && !scratch1.is(key)); 668 DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
669 DCHECK(!scratch2.is(receiver) && !scratch2.is(key)); 669 DCHECK(!scratch2.is(receiver) && !scratch2.is(key));
670 670
671 // Check that the receiver isn't a smi. 671 // Check that the receiver isn't a smi.
672 __ JumpIfSmi(receiver, &slow); 672 __ JumpIfSmi(receiver, &slow);
673 673
674 // Check that the key is an array index, that is Uint32. 674 // Check that the key is an array index, that is Uint32.
675 __ NonNegativeSmiTst(key); 675 __ NonNegativeSmiTst(key);
(...skipping 18 matching lines...) Expand all
694 masm->isolate()), 694 masm->isolate()),
695 2, 1); 695 2, 1);
696 696
697 __ bind(&slow); 697 __ bind(&slow);
698 GenerateMiss(masm); 698 GenerateMiss(masm);
699 } 699 }
700 700
701 701
702 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 702 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
703 // Push receiver, key and value for runtime call. 703 // Push receiver, key and value for runtime call.
704 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 704 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
705 StoreConvention::ValueRegister()); 705 StoreDescriptor::ValueRegister());
706 706
707 ExternalReference ref = 707 ExternalReference ref =
708 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 708 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
709 __ TailCallExternalReference(ref, 3, 1); 709 __ TailCallExternalReference(ref, 3, 1);
710 } 710 }
711 711
712 712
713 static void KeyedStoreGenerateGenericHelper( 713 static void KeyedStoreGenerateGenericHelper(
714 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 714 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
715 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 715 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 // -- r0 : value 857 // -- r0 : value
858 // -- r1 : key 858 // -- r1 : key
859 // -- r2 : receiver 859 // -- r2 : receiver
860 // -- lr : return address 860 // -- lr : return address
861 // ----------------------------------- 861 // -----------------------------------
862 Label slow, fast_object, fast_object_grow; 862 Label slow, fast_object, fast_object_grow;
863 Label fast_double, fast_double_grow; 863 Label fast_double, fast_double_grow;
864 Label array, extra, check_if_double_array; 864 Label array, extra, check_if_double_array;
865 865
866 // Register usage. 866 // Register usage.
867 Register value = StoreConvention::ValueRegister(); 867 Register value = StoreDescriptor::ValueRegister();
868 Register key = StoreConvention::NameRegister(); 868 Register key = StoreDescriptor::NameRegister();
869 Register receiver = StoreConvention::ReceiverRegister(); 869 Register receiver = StoreDescriptor::ReceiverRegister();
870 DCHECK(receiver.is(r1)); 870 DCHECK(receiver.is(r1));
871 DCHECK(key.is(r2)); 871 DCHECK(key.is(r2));
872 DCHECK(value.is(r0)); 872 DCHECK(value.is(r0));
873 Register receiver_map = r3; 873 Register receiver_map = r3;
874 Register elements_map = r6; 874 Register elements_map = r6;
875 Register elements = r9; // Elements array of the receiver. 875 Register elements = r9; // Elements array of the receiver.
876 // r4 and r5 are used as general scratch registers. 876 // r4 and r5 are used as general scratch registers.
877 877
878 // Check that the key is a smi. 878 // Check that the key is a smi.
879 __ JumpIfNotSmi(key, &slow); 879 __ JumpIfNotSmi(key, &slow);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 masm, &fast_object, &fast_double, &slow, kCheckMap, kDontIncrementLength, 946 masm, &fast_object, &fast_double, &slow, kCheckMap, kDontIncrementLength,
947 value, key, receiver, receiver_map, elements_map, elements); 947 value, key, receiver, receiver_map, elements_map, elements);
948 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, 948 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow,
949 &slow, kDontCheckMap, kIncrementLength, value, 949 &slow, kDontCheckMap, kIncrementLength, value,
950 key, receiver, receiver_map, elements_map, 950 key, receiver, receiver_map, elements_map,
951 elements); 951 elements);
952 } 952 }
953 953
954 954
955 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 955 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
956 Register receiver = StoreConvention::ReceiverRegister(); 956 Register receiver = StoreDescriptor::ReceiverRegister();
957 Register name = StoreConvention::NameRegister(); 957 Register name = StoreDescriptor::NameRegister();
958 DCHECK(receiver.is(r1)); 958 DCHECK(receiver.is(r1));
959 DCHECK(name.is(r2)); 959 DCHECK(name.is(r2));
960 DCHECK(StoreConvention::ValueRegister().is(r0)); 960 DCHECK(StoreDescriptor::ValueRegister().is(r0));
961 961
962 // Get the receiver from the stack and probe the stub cache. 962 // Get the receiver from the stack and probe the stub cache.
963 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 963 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
964 Code::ComputeHandlerFlags(Code::STORE_IC)); 964 Code::ComputeHandlerFlags(Code::STORE_IC));
965 965
966 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, r3, 966 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, r3,
967 r4, r5, r6); 967 r4, r5, r6);
968 968
969 // Cache miss: Jump to runtime. 969 // Cache miss: Jump to runtime.
970 GenerateMiss(masm); 970 GenerateMiss(masm);
971 } 971 }
972 972
973 973
974 void StoreIC::GenerateMiss(MacroAssembler* masm) { 974 void StoreIC::GenerateMiss(MacroAssembler* masm) {
975 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 975 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
976 StoreConvention::ValueRegister()); 976 StoreDescriptor::ValueRegister());
977 977
978 // Perform tail call to the entry. 978 // Perform tail call to the entry.
979 ExternalReference ref = 979 ExternalReference ref =
980 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); 980 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
981 __ TailCallExternalReference(ref, 3, 1); 981 __ TailCallExternalReference(ref, 3, 1);
982 } 982 }
983 983
984 984
985 void StoreIC::GenerateNormal(MacroAssembler* masm) { 985 void StoreIC::GenerateNormal(MacroAssembler* masm) {
986 Label miss; 986 Label miss;
987 Register receiver = StoreConvention::ReceiverRegister(); 987 Register receiver = StoreDescriptor::ReceiverRegister();
988 Register name = StoreConvention::NameRegister(); 988 Register name = StoreDescriptor::NameRegister();
989 Register value = StoreConvention::ValueRegister(); 989 Register value = StoreDescriptor::ValueRegister();
990 Register dictionary = r3; 990 Register dictionary = r3;
991 DCHECK(receiver.is(r1)); 991 DCHECK(receiver.is(r1));
992 DCHECK(name.is(r2)); 992 DCHECK(name.is(r2));
993 DCHECK(value.is(r0)); 993 DCHECK(value.is(r0));
994 994
995 __ ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 995 __ ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
996 996
997 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r4, r5); 997 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r4, r5);
998 Counters* counters = masm->isolate()->counters(); 998 Counters* counters = masm->isolate()->counters();
999 __ IncrementCounter(counters->store_normal_hit(), 1, r4, r5); 999 __ IncrementCounter(counters->store_normal_hit(), 1, r4, r5);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 patcher.EmitCondition(ne); 1096 patcher.EmitCondition(ne);
1097 } else { 1097 } else {
1098 DCHECK(Assembler::GetCondition(branch_instr) == ne); 1098 DCHECK(Assembler::GetCondition(branch_instr) == ne);
1099 patcher.EmitCondition(eq); 1099 patcher.EmitCondition(eq);
1100 } 1100 }
1101 } 1101 }
1102 } 1102 }
1103 } // namespace v8::internal 1103 } // namespace v8::internal
1104 1104
1105 #endif // V8_TARGET_ARCH_ARM 1105 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698