OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 // Do tail-call to the runtime system. | 1162 // Do tail-call to the runtime system. |
1163 ExternalReference store_ic_property = | 1163 ExternalReference store_ic_property = |
1164 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); | 1164 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); |
1165 __ TailCallExternalReference(store_ic_property, 3, 1); | 1165 __ TailCallExternalReference(store_ic_property, 3, 1); |
1166 | 1166 |
1167 // Return the generated code. | 1167 // Return the generated code. |
1168 return GetCode(kind(), Code::FAST, name); | 1168 return GetCode(kind(), Code::FAST, name); |
1169 } | 1169 } |
1170 | 1170 |
1171 | 1171 |
| 1172 void StoreStubCompiler::GenerateStoreArrayLength() { |
| 1173 // Prepare tail call to StoreIC_ArrayLength. |
| 1174 __ PopReturnAddressTo(scratch1()); |
| 1175 __ push(receiver()); |
| 1176 __ push(value()); |
| 1177 __ PushReturnAddressFrom(scratch1()); |
| 1178 |
| 1179 ExternalReference ref = |
| 1180 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), |
| 1181 masm()->isolate()); |
| 1182 __ TailCallExternalReference(ref, 2, 1); |
| 1183 } |
| 1184 |
| 1185 |
1172 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( | 1186 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( |
1173 MapHandleList* receiver_maps, | 1187 MapHandleList* receiver_maps, |
1174 CodeHandleList* handler_stubs, | 1188 CodeHandleList* handler_stubs, |
1175 MapHandleList* transitioned_maps) { | 1189 MapHandleList* transitioned_maps) { |
1176 Label miss; | 1190 Label miss; |
1177 __ JumpIfSmi(receiver(), &miss, Label::kNear); | 1191 __ JumpIfSmi(receiver(), &miss, Label::kNear); |
1178 | 1192 |
1179 __ movp(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset)); | 1193 __ movp(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset)); |
1180 int receiver_count = receiver_maps->length(); | 1194 int receiver_count = receiver_maps->length(); |
1181 for (int i = 0; i < receiver_count; ++i) { | 1195 for (int i = 0; i < receiver_count; ++i) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 // ----------------------------------- | 1440 // ----------------------------------- |
1427 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1441 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1428 } | 1442 } |
1429 | 1443 |
1430 | 1444 |
1431 #undef __ | 1445 #undef __ |
1432 | 1446 |
1433 } } // namespace v8::internal | 1447 } } // namespace v8::internal |
1434 | 1448 |
1435 #endif // V8_TARGET_ARCH_X64 | 1449 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |