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

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

Issue 504743002: MIPS: Remove KeyedStoreIC::GenerateRuntimeSetProperty and move Store::GenerateRuntimeSetProperty to… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/mips64/ic-compiler-mips64.cc ('k') | no next file » | 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_MIPS64 8 #if V8_TARGET_ARCH_MIPS64
9 9
10 #include "src/codegen.h" 10 #include "src/codegen.h"
11 #include "src/ic/ic.h" 11 #include "src/ic/ic.h"
12 #include "src/ic/ic-compiler.h"
12 #include "src/ic/stub-cache.h" 13 #include "src/ic/stub-cache.h"
13 14
14 namespace v8 { 15 namespace v8 {
15 namespace internal { 16 namespace internal {
16 17
17 18
18 // ---------------------------------------------------------------------------- 19 // ----------------------------------------------------------------------------
19 // Static IC stub generators. 20 // Static IC stub generators.
20 // 21 //
21 22
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 __ Ret(); 686 __ Ret();
686 687
687 StubRuntimeCallHelper call_helper; 688 StubRuntimeCallHelper call_helper;
688 char_at_generator.GenerateSlow(masm, call_helper); 689 char_at_generator.GenerateSlow(masm, call_helper);
689 690
690 __ bind(&miss); 691 __ bind(&miss);
691 GenerateMiss(masm); 692 GenerateMiss(masm);
692 } 693 }
693 694
694 695
695 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm,
696 StrictMode strict_mode) {
697 // Push receiver, key and value for runtime call.
698 __ Push(ReceiverRegister(), NameRegister(), ValueRegister());
699
700 __ li(a0, Operand(Smi::FromInt(strict_mode))); // Strict mode.
701 __ Push(a0);
702
703 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
704 }
705
706
707 static void KeyedStoreGenerateGenericHelper( 696 static void KeyedStoreGenerateGenericHelper(
708 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 697 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
709 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 698 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
710 Register value, Register key, Register receiver, Register receiver_map, 699 Register value, Register key, Register receiver, Register receiver_map,
711 Register elements_map, Register elements) { 700 Register elements_map, Register elements) {
712 Label transition_smi_elements; 701 Label transition_smi_elements;
713 Label finish_object_store, non_double_value, transition_double_elements; 702 Label finish_object_store, non_double_value, transition_double_elements;
714 Label fast_double_without_map_check; 703 Label fast_double_without_map_check;
715 704
716 // Fast case: Do the store, could be either Object or double. 705 // Fast case: Do the store, could be either Object or double.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 // Check array bounds. Both the key and the length of FixedArray are smis. 888 // Check array bounds. Both the key and the length of FixedArray are smis.
900 __ ld(a4, FieldMemOperand(elements, FixedArray::kLengthOffset)); 889 __ ld(a4, FieldMemOperand(elements, FixedArray::kLengthOffset));
901 __ Branch(&fast_object, lo, key, Operand(a4)); 890 __ Branch(&fast_object, lo, key, Operand(a4));
902 891
903 // Slow case, handle jump to runtime. 892 // Slow case, handle jump to runtime.
904 __ bind(&slow); 893 __ bind(&slow);
905 // Entry registers are intact. 894 // Entry registers are intact.
906 // a0: value. 895 // a0: value.
907 // a1: key. 896 // a1: key.
908 // a2: receiver. 897 // a2: receiver.
909 GenerateRuntimeSetProperty(masm, strict_mode); 898 PropertyICCompiler::GenerateRuntimeSetProperty(masm, strict_mode);
910 899
911 // Extra capacity case: Check if there is extra capacity to 900 // Extra capacity case: Check if there is extra capacity to
912 // perform the store and update the length. Used for adding one 901 // perform the store and update the length. Used for adding one
913 // element to the array by writing to array[array.length]. 902 // element to the array by writing to array[array.length].
914 __ bind(&extra); 903 __ bind(&extra);
915 // Condition code from comparing key and array length is still available. 904 // Condition code from comparing key and array length is still available.
916 // Only support writing to array[array.length]. 905 // Only support writing to array[array.length].
917 __ Branch(&slow, ne, key, Operand(a4)); 906 __ Branch(&slow, ne, key, Operand(a4));
918 // Check for room in the elements backing store. 907 // Check for room in the elements backing store.
919 // Both the key and the length of FixedArray are smis. 908 // Both the key and the length of FixedArray are smis.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 Counters* counters = masm->isolate()->counters(); 1054 Counters* counters = masm->isolate()->counters();
1066 __ IncrementCounter(counters->store_normal_hit(), 1, a4, a5); 1055 __ IncrementCounter(counters->store_normal_hit(), 1, a4, a5);
1067 __ Ret(); 1056 __ Ret();
1068 1057
1069 __ bind(&miss); 1058 __ bind(&miss);
1070 __ IncrementCounter(counters->store_normal_miss(), 1, a4, a5); 1059 __ IncrementCounter(counters->store_normal_miss(), 1, a4, a5);
1071 GenerateMiss(masm); 1060 GenerateMiss(masm);
1072 } 1061 }
1073 1062
1074 1063
1075 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm,
1076 StrictMode strict_mode) {
1077 __ Push(ReceiverRegister(), NameRegister(), ValueRegister());
1078
1079 __ li(a0, Operand(Smi::FromInt(strict_mode)));
1080 __ Push(a0);
1081
1082 // Do tail-call to runtime routine.
1083 __ TailCallRuntime(Runtime::kSetProperty, 4, 1);
1084 }
1085
1086
1087 #undef __ 1064 #undef __
1088 1065
1089 1066
1090 Condition CompareIC::ComputeCondition(Token::Value op) { 1067 Condition CompareIC::ComputeCondition(Token::Value op) {
1091 switch (op) { 1068 switch (op) {
1092 case Token::EQ_STRICT: 1069 case Token::EQ_STRICT:
1093 case Token::EQ: 1070 case Token::EQ:
1094 return eq; 1071 return eq;
1095 case Token::LT: 1072 case Token::LT:
1096 return lt; 1073 return lt;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 patcher.ChangeBranchCondition(ne); 1153 patcher.ChangeBranchCondition(ne);
1177 } else { 1154 } else {
1178 DCHECK(Assembler::IsBne(branch_instr)); 1155 DCHECK(Assembler::IsBne(branch_instr));
1179 patcher.ChangeBranchCondition(eq); 1156 patcher.ChangeBranchCondition(eq);
1180 } 1157 }
1181 } 1158 }
1182 } 1159 }
1183 } // namespace v8::internal 1160 } // namespace v8::internal
1184 1161
1185 #endif // V8_TARGET_ARCH_MIPS64 1162 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-compiler-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698