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

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

Issue 538573002: MIPS: Make concrete classes for individual call descriptors. - internal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips64 port added. 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
« no previous file with comments | « src/ic/mips/ic-conventions-mips.cc ('k') | src/ic/mips64/access-compiler-mips64.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 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 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 STATIC_ASSERT(kInternalizedTag == 0); 244 STATIC_ASSERT(kInternalizedTag == 0);
245 __ And(at, hash, Operand(kIsNotInternalizedMask)); 245 __ And(at, hash, Operand(kIsNotInternalizedMask));
246 __ Branch(not_unique, ne, at, Operand(zero_reg)); 246 __ Branch(not_unique, ne, at, Operand(zero_reg));
247 247
248 __ bind(&unique); 248 __ bind(&unique);
249 } 249 }
250 250
251 251
252 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 252 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
253 // The return address is in lr. 253 // The return address is in lr.
254 Register receiver = LoadConvention::ReceiverRegister(); 254 Register receiver = LoadDescriptor::ReceiverRegister();
255 Register name = LoadConvention::NameRegister(); 255 Register name = LoadDescriptor::NameRegister();
256 DCHECK(receiver.is(a1)); 256 DCHECK(receiver.is(a1));
257 DCHECK(name.is(a2)); 257 DCHECK(name.is(a2));
258 258
259 // Probe the stub cache. 259 // Probe the stub cache.
260 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 260 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
261 Code::ComputeHandlerFlags(Code::LOAD_IC)); 261 Code::ComputeHandlerFlags(Code::LOAD_IC));
262 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3, 262 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3,
263 t0, t1, t2); 263 t0, t1, t2);
264 264
265 // Cache miss: Jump to runtime. 265 // Cache miss: Jump to runtime.
266 GenerateMiss(masm); 266 GenerateMiss(masm);
267 } 267 }
268 268
269 269
270 void LoadIC::GenerateNormal(MacroAssembler* masm) { 270 void LoadIC::GenerateNormal(MacroAssembler* masm) {
271 Register dictionary = a0; 271 Register dictionary = a0;
272 DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); 272 DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
273 DCHECK(!dictionary.is(LoadConvention::NameRegister())); 273 DCHECK(!dictionary.is(LoadDescriptor::NameRegister()));
274 274
275 Label slow; 275 Label slow;
276 276
277 __ lw(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), 277 __ lw(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(),
278 JSObject::kPropertiesOffset)); 278 JSObject::kPropertiesOffset));
279 GenerateDictionaryLoad(masm, &slow, dictionary, 279 GenerateDictionaryLoad(masm, &slow, dictionary,
280 LoadConvention::NameRegister(), v0, a3, t0); 280 LoadDescriptor::NameRegister(), v0, a3, t0);
281 __ Ret(); 281 __ Ret();
282 282
283 // Dictionary load failed, go slow (but don't miss). 283 // Dictionary load failed, go slow (but don't miss).
284 __ bind(&slow); 284 __ bind(&slow);
285 GenerateRuntimeGetProperty(masm); 285 GenerateRuntimeGetProperty(masm);
286 } 286 }
287 287
288 288
289 // A register that isn't one of the parameters to the load ic. 289 // A register that isn't one of the parameters to the load ic.
290 static const Register LoadIC_TempRegister() { return a3; } 290 static const Register LoadIC_TempRegister() { return a3; }
291 291
292 292
293 void LoadIC::GenerateMiss(MacroAssembler* masm) { 293 void LoadIC::GenerateMiss(MacroAssembler* masm) {
294 // The return address is in ra. 294 // The return address is in ra.
295 Isolate* isolate = masm->isolate(); 295 Isolate* isolate = masm->isolate();
296 296
297 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 297 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
298 298
299 __ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister()); 299 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
300 __ Push(LoadIC_TempRegister(), LoadConvention::NameRegister()); 300 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
301 301
302 // Perform tail call to the entry. 302 // Perform tail call to the entry.
303 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); 303 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate);
304 __ TailCallExternalReference(ref, 2, 1); 304 __ TailCallExternalReference(ref, 2, 1);
305 } 305 }
306 306
307 307
308 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 308 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
309 // The return address is in ra. 309 // The return address is in ra.
310 310
311 __ mov(LoadIC_TempRegister(), LoadConvention::ReceiverRegister()); 311 __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister());
312 __ Push(LoadIC_TempRegister(), LoadConvention::NameRegister()); 312 __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister());
313 313
314 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); 314 __ TailCallRuntime(Runtime::kGetProperty, 2, 1);
315 } 315 }
316 316
317 317
318 static MemOperand GenerateMappedArgumentsLookup( 318 static MemOperand GenerateMappedArgumentsLookup(
319 MacroAssembler* masm, Register object, Register key, Register scratch1, 319 MacroAssembler* masm, Register object, Register key, Register scratch1,
320 Register scratch2, Register scratch3, Label* unmapped_case, 320 Register scratch2, Register scratch3, Label* unmapped_case,
321 Label* slow_case) { 321 Label* slow_case) {
322 Heap* heap = masm->isolate()->heap(); 322 Heap* heap = masm->isolate()->heap();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 __ li(scratch, Operand(kPointerSize >> 1)); 387 __ li(scratch, Operand(kPointerSize >> 1));
388 __ Mul(scratch, key, scratch); 388 __ Mul(scratch, key, scratch);
389 __ Addu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 389 __ Addu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
390 __ Addu(scratch, backing_store, scratch); 390 __ Addu(scratch, backing_store, scratch);
391 return MemOperand(scratch); 391 return MemOperand(scratch);
392 } 392 }
393 393
394 394
395 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { 395 void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
396 // The return address is in ra. 396 // The return address is in ra.
397 Register receiver = LoadConvention::ReceiverRegister(); 397 Register receiver = LoadDescriptor::ReceiverRegister();
398 Register key = LoadConvention::NameRegister(); 398 Register key = LoadDescriptor::NameRegister();
399 DCHECK(receiver.is(a1)); 399 DCHECK(receiver.is(a1));
400 DCHECK(key.is(a2)); 400 DCHECK(key.is(a2));
401 401
402 Label slow, notin; 402 Label slow, notin;
403 MemOperand mapped_location = GenerateMappedArgumentsLookup( 403 MemOperand mapped_location = GenerateMappedArgumentsLookup(
404 masm, receiver, key, a0, a3, t0, &notin, &slow); 404 masm, receiver, key, a0, a3, t0, &notin, &slow);
405 __ Ret(USE_DELAY_SLOT); 405 __ Ret(USE_DELAY_SLOT);
406 __ lw(v0, mapped_location); 406 __ lw(v0, mapped_location);
407 __ bind(&notin); 407 __ bind(&notin);
408 // The unmapped lookup expects that the parameter map is in a0. 408 // The unmapped lookup expects that the parameter map is in a0.
409 MemOperand unmapped_location = 409 MemOperand unmapped_location =
410 GenerateUnmappedArgumentsLookup(masm, key, a0, a3, &slow); 410 GenerateUnmappedArgumentsLookup(masm, key, a0, a3, &slow);
411 __ lw(a0, unmapped_location); 411 __ lw(a0, unmapped_location);
412 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex); 412 __ LoadRoot(a3, Heap::kTheHoleValueRootIndex);
413 __ Branch(&slow, eq, a0, Operand(a3)); 413 __ Branch(&slow, eq, a0, Operand(a3));
414 __ Ret(USE_DELAY_SLOT); 414 __ Ret(USE_DELAY_SLOT);
415 __ mov(v0, a0); 415 __ mov(v0, a0);
416 __ bind(&slow); 416 __ bind(&slow);
417 GenerateMiss(masm); 417 GenerateMiss(masm);
418 } 418 }
419 419
420 420
421 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { 421 void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
422 Register receiver = StoreConvention::ReceiverRegister(); 422 Register receiver = StoreDescriptor::ReceiverRegister();
423 Register key = StoreConvention::NameRegister(); 423 Register key = StoreDescriptor::NameRegister();
424 Register value = StoreConvention::ValueRegister(); 424 Register value = StoreDescriptor::ValueRegister();
425 DCHECK(value.is(a0)); 425 DCHECK(value.is(a0));
426 426
427 Label slow, notin; 427 Label slow, notin;
428 // Store address is returned in register (of MemOperand) mapped_location. 428 // Store address is returned in register (of MemOperand) mapped_location.
429 MemOperand mapped_location = GenerateMappedArgumentsLookup( 429 MemOperand mapped_location = GenerateMappedArgumentsLookup(
430 masm, receiver, key, a3, t0, t1, &notin, &slow); 430 masm, receiver, key, a3, t0, t1, &notin, &slow);
431 __ sw(value, mapped_location); 431 __ sw(value, mapped_location);
432 __ mov(t5, value); 432 __ mov(t5, value);
433 DCHECK_EQ(mapped_location.offset(), 0); 433 DCHECK_EQ(mapped_location.offset(), 0);
434 __ RecordWrite(a3, mapped_location.rm(), t5, kRAHasNotBeenSaved, 434 __ RecordWrite(a3, mapped_location.rm(), t5, kRAHasNotBeenSaved,
(...skipping 16 matching lines...) Expand all
451 GenerateMiss(masm); 451 GenerateMiss(masm);
452 } 452 }
453 453
454 454
455 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { 455 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
456 // The return address is in ra. 456 // The return address is in ra.
457 Isolate* isolate = masm->isolate(); 457 Isolate* isolate = masm->isolate();
458 458
459 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0); 459 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, a3, t0);
460 460
461 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 461 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
462 462
463 // Perform tail call to the entry. 463 // Perform tail call to the entry.
464 ExternalReference ref = 464 ExternalReference ref =
465 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); 465 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate);
466 466
467 __ TailCallExternalReference(ref, 2, 1); 467 __ TailCallExternalReference(ref, 2, 1);
468 } 468 }
469 469
470 470
471 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { 471 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
472 // The return address is in ra. 472 // The return address is in ra.
473 473
474 __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); 474 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister());
475 475
476 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 476 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
477 } 477 }
478 478
479 479
480 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { 480 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
481 // The return address is in ra. 481 // The return address is in ra.
482 Label slow, check_name, index_smi, index_name, property_array_property; 482 Label slow, check_name, index_smi, index_name, property_array_property;
483 Label probe_dictionary, check_number_dictionary; 483 Label probe_dictionary, check_number_dictionary;
484 484
485 Register key = LoadConvention::NameRegister(); 485 Register key = LoadDescriptor::NameRegister();
486 Register receiver = LoadConvention::ReceiverRegister(); 486 Register receiver = LoadDescriptor::ReceiverRegister();
487 DCHECK(key.is(a2)); 487 DCHECK(key.is(a2));
488 DCHECK(receiver.is(a1)); 488 DCHECK(receiver.is(a1));
489 489
490 Isolate* isolate = masm->isolate(); 490 Isolate* isolate = masm->isolate();
491 491
492 // Check that the key is a smi. 492 // Check that the key is a smi.
493 __ JumpIfNotSmi(key, &check_name); 493 __ JumpIfNotSmi(key, &check_name);
494 __ bind(&index_smi); 494 __ bind(&index_smi);
495 // Now the key is known to be a smi. This place is also jumped to from below 495 // Now the key is known to be a smi. This place is also jumped to from below
496 // where a numeric string is converted to a smi. 496 // where a numeric string is converted to a smi.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 __ IndexFromHash(a3, key); 635 __ IndexFromHash(a3, key);
636 // Now jump to the place where smi keys are handled. 636 // Now jump to the place where smi keys are handled.
637 __ Branch(&index_smi); 637 __ Branch(&index_smi);
638 } 638 }
639 639
640 640
641 void KeyedLoadIC::GenerateString(MacroAssembler* masm) { 641 void KeyedLoadIC::GenerateString(MacroAssembler* masm) {
642 // Return address is in ra. 642 // Return address is in ra.
643 Label miss; 643 Label miss;
644 644
645 Register receiver = LoadConvention::ReceiverRegister(); 645 Register receiver = LoadDescriptor::ReceiverRegister();
646 Register index = LoadConvention::NameRegister(); 646 Register index = LoadDescriptor::NameRegister();
647 Register scratch = a3; 647 Register scratch = a3;
648 Register result = v0; 648 Register result = v0;
649 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 649 DCHECK(!scratch.is(receiver) && !scratch.is(index));
650 650
651 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 651 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
652 &miss, // When not a string. 652 &miss, // When not a string.
653 &miss, // When not a number. 653 &miss, // When not a number.
654 &miss, // When index out of range. 654 &miss, // When index out of range.
655 STRING_INDEX_IS_ARRAY_INDEX); 655 STRING_INDEX_IS_ARRAY_INDEX);
656 char_at_generator.GenerateFast(masm); 656 char_at_generator.GenerateFast(masm);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 // -- a0 : value 816 // -- a0 : value
817 // -- a1 : key 817 // -- a1 : key
818 // -- a2 : receiver 818 // -- a2 : receiver
819 // -- ra : return address 819 // -- ra : return address
820 // ----------------------------------- 820 // -----------------------------------
821 Label slow, fast_object, fast_object_grow; 821 Label slow, fast_object, fast_object_grow;
822 Label fast_double, fast_double_grow; 822 Label fast_double, fast_double_grow;
823 Label array, extra, check_if_double_array; 823 Label array, extra, check_if_double_array;
824 824
825 // Register usage. 825 // Register usage.
826 Register value = StoreConvention::ValueRegister(); 826 Register value = StoreDescriptor::ValueRegister();
827 Register key = StoreConvention::NameRegister(); 827 Register key = StoreDescriptor::NameRegister();
828 Register receiver = StoreConvention::ReceiverRegister(); 828 Register receiver = StoreDescriptor::ReceiverRegister();
829 DCHECK(value.is(a0)); 829 DCHECK(value.is(a0));
830 Register receiver_map = a3; 830 Register receiver_map = a3;
831 Register elements_map = t2; 831 Register elements_map = t2;
832 Register elements = t3; // Elements array of the receiver. 832 Register elements = t3; // Elements array of the receiver.
833 // t0 and t1 are used as general scratch registers. 833 // t0 and t1 are used as general scratch registers.
834 834
835 // Check that the key is a smi. 835 // Check that the key is a smi.
836 __ JumpIfNotSmi(key, &slow); 836 __ JumpIfNotSmi(key, &slow);
837 // Check that the object isn't a smi. 837 // Check that the object isn't a smi.
838 __ JumpIfSmi(receiver, &slow); 838 __ JumpIfSmi(receiver, &slow);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 &slow, kDontCheckMap, kIncrementLength, value, 902 &slow, kDontCheckMap, kIncrementLength, value,
903 key, receiver, receiver_map, elements_map, 903 key, receiver, receiver_map, elements_map,
904 elements); 904 elements);
905 } 905 }
906 906
907 907
908 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { 908 void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) {
909 // Return address is in ra. 909 // Return address is in ra.
910 Label slow; 910 Label slow;
911 911
912 Register receiver = LoadConvention::ReceiverRegister(); 912 Register receiver = LoadDescriptor::ReceiverRegister();
913 Register key = LoadConvention::NameRegister(); 913 Register key = LoadDescriptor::NameRegister();
914 Register scratch1 = a3; 914 Register scratch1 = a3;
915 Register scratch2 = t0; 915 Register scratch2 = t0;
916 DCHECK(!scratch1.is(receiver) && !scratch1.is(key)); 916 DCHECK(!scratch1.is(receiver) && !scratch1.is(key));
917 DCHECK(!scratch2.is(receiver) && !scratch2.is(key)); 917 DCHECK(!scratch2.is(receiver) && !scratch2.is(key));
918 918
919 // Check that the receiver isn't a smi. 919 // Check that the receiver isn't a smi.
920 __ JumpIfSmi(receiver, &slow); 920 __ JumpIfSmi(receiver, &slow);
921 921
922 // Check that the key is an array index, that is Uint32. 922 // Check that the key is an array index, that is Uint32.
923 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask)); 923 __ And(t0, key, Operand(kSmiTagMask | kSmiSignMask));
(...skipping 16 matching lines...) Expand all
940 masm->isolate()), 940 masm->isolate()),
941 2, 1); 941 2, 1);
942 942
943 __ bind(&slow); 943 __ bind(&slow);
944 GenerateMiss(masm); 944 GenerateMiss(masm);
945 } 945 }
946 946
947 947
948 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 948 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
949 // Push receiver, key and value for runtime call. 949 // Push receiver, key and value for runtime call.
950 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 950 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
951 StoreConvention::ValueRegister()); 951 StoreDescriptor::ValueRegister());
952 952
953 ExternalReference ref = 953 ExternalReference ref =
954 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); 954 ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate());
955 __ TailCallExternalReference(ref, 3, 1); 955 __ TailCallExternalReference(ref, 3, 1);
956 } 956 }
957 957
958 958
959 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 959 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
960 Register receiver = StoreConvention::ReceiverRegister(); 960 Register receiver = StoreDescriptor::ReceiverRegister();
961 Register name = StoreConvention::NameRegister(); 961 Register name = StoreDescriptor::NameRegister();
962 DCHECK(receiver.is(a1)); 962 DCHECK(receiver.is(a1));
963 DCHECK(name.is(a2)); 963 DCHECK(name.is(a2));
964 DCHECK(StoreConvention::ValueRegister().is(a0)); 964 DCHECK(StoreDescriptor::ValueRegister().is(a0));
965 965
966 // Get the receiver from the stack and probe the stub cache. 966 // Get the receiver from the stack and probe the stub cache.
967 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 967 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
968 Code::ComputeHandlerFlags(Code::STORE_IC)); 968 Code::ComputeHandlerFlags(Code::STORE_IC));
969 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3, 969 masm->isolate()->stub_cache()->GenerateProbe(masm, flags, receiver, name, a3,
970 t0, t1, t2); 970 t0, t1, t2);
971 971
972 // Cache miss: Jump to runtime. 972 // Cache miss: Jump to runtime.
973 GenerateMiss(masm); 973 GenerateMiss(masm);
974 } 974 }
975 975
976 976
977 void StoreIC::GenerateMiss(MacroAssembler* masm) { 977 void StoreIC::GenerateMiss(MacroAssembler* masm) {
978 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 978 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
979 StoreConvention::ValueRegister()); 979 StoreDescriptor::ValueRegister());
980 // Perform tail call to the entry. 980 // Perform tail call to the entry.
981 ExternalReference ref = 981 ExternalReference ref =
982 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate()); 982 ExternalReference(IC_Utility(kStoreIC_Miss), masm->isolate());
983 __ TailCallExternalReference(ref, 3, 1); 983 __ TailCallExternalReference(ref, 3, 1);
984 } 984 }
985 985
986 986
987 void StoreIC::GenerateNormal(MacroAssembler* masm) { 987 void StoreIC::GenerateNormal(MacroAssembler* masm) {
988 Label miss; 988 Label miss;
989 Register receiver = StoreConvention::ReceiverRegister(); 989 Register receiver = StoreDescriptor::ReceiverRegister();
990 Register name = StoreConvention::NameRegister(); 990 Register name = StoreDescriptor::NameRegister();
991 Register value = StoreConvention::ValueRegister(); 991 Register value = StoreDescriptor::ValueRegister();
992 Register dictionary = a3; 992 Register dictionary = a3;
993 DCHECK(receiver.is(a1)); 993 DCHECK(receiver.is(a1));
994 DCHECK(name.is(a2)); 994 DCHECK(name.is(a2));
995 DCHECK(value.is(a0)); 995 DCHECK(value.is(a0));
996 996
997 __ lw(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 997 __ lw(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
998 998
999 GenerateDictionaryStore(masm, &miss, dictionary, name, value, t0, t1); 999 GenerateDictionaryStore(masm, &miss, dictionary, name, value, t0, t1);
1000 Counters* counters = masm->isolate()->counters(); 1000 Counters* counters = masm->isolate()->counters();
1001 __ IncrementCounter(counters->store_normal_hit(), 1, t0, t1); 1001 __ IncrementCounter(counters->store_normal_hit(), 1, t0, t1);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 patcher.ChangeBranchCondition(ne); 1099 patcher.ChangeBranchCondition(ne);
1100 } else { 1100 } else {
1101 DCHECK(Assembler::IsBne(branch_instr)); 1101 DCHECK(Assembler::IsBne(branch_instr));
1102 patcher.ChangeBranchCondition(eq); 1102 patcher.ChangeBranchCondition(eq);
1103 } 1103 }
1104 } 1104 }
1105 } 1105 }
1106 } // namespace v8::internal 1106 } // namespace v8::internal
1107 1107
1108 #endif // V8_TARGET_ARCH_MIPS 1108 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/mips/ic-conventions-mips.cc ('k') | src/ic/mips64/access-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698