| 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // Compare smis. | 940 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // Compare smis. |
| 941 __ j(above_equal, &extra); | 941 __ j(above_equal, &extra); |
| 942 | 942 |
| 943 KeyedStoreGenerateGenericHelper(masm, &fast_object, &fast_double, | 943 KeyedStoreGenerateGenericHelper(masm, &fast_object, &fast_double, |
| 944 &slow, kCheckMap, kDontIncrementLength); | 944 &slow, kCheckMap, kDontIncrementLength); |
| 945 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, | 945 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, |
| 946 &slow, kDontCheckMap, kIncrementLength); | 946 &slow, kDontCheckMap, kIncrementLength); |
| 947 } | 947 } |
| 948 | 948 |
| 949 | 949 |
| 950 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 950 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, |
| 951 ExtraICState extra_state) { |
| 951 // ----------- S t a t e ------------- | 952 // ----------- S t a t e ------------- |
| 952 // -- ecx : name | 953 // -- ecx : name |
| 953 // -- edx : receiver | 954 // -- edx : receiver |
| 954 // -- esp[0] : return address | 955 // -- esp[0] : return address |
| 955 // ----------------------------------- | 956 // ----------------------------------- |
| 956 | 957 |
| 957 // Probe the stub cache. | 958 // Probe the stub cache. |
| 958 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); | 959 Code::Flags flags = Code::ComputeFlags( |
| 960 Code::HANDLER, MONOMORPHIC, extra_state, |
| 961 Code::NORMAL, Code::LOAD_IC); |
| 959 masm->isolate()->stub_cache()->GenerateProbe( | 962 masm->isolate()->stub_cache()->GenerateProbe( |
| 960 masm, flags, edx, ecx, ebx, eax); | 963 masm, flags, edx, ecx, ebx, eax); |
| 961 | 964 |
| 962 // Cache miss: Jump to runtime. | 965 // Cache miss: Jump to runtime. |
| 963 GenerateMiss(masm); | 966 GenerateMiss(masm); |
| 964 } | 967 } |
| 965 | 968 |
| 966 | 969 |
| 967 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 970 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 968 // ----------- S t a t e ------------- | 971 // ----------- S t a t e ------------- |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 __ pop(ebx); | 1057 __ pop(ebx); |
| 1055 __ push(edx); // receiver | 1058 __ push(edx); // receiver |
| 1056 __ push(ecx); // name | 1059 __ push(ecx); // name |
| 1057 __ push(ebx); // return address | 1060 __ push(ebx); // return address |
| 1058 | 1061 |
| 1059 // Perform tail call to the entry. | 1062 // Perform tail call to the entry. |
| 1060 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 1063 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
| 1061 } | 1064 } |
| 1062 | 1065 |
| 1063 | 1066 |
| 1064 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 1067 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| 1068 ExtraICState extra_ic_state) { |
| 1065 // ----------- S t a t e ------------- | 1069 // ----------- S t a t e ------------- |
| 1066 // -- eax : value | 1070 // -- eax : value |
| 1067 // -- ecx : name | 1071 // -- ecx : name |
| 1068 // -- edx : receiver | 1072 // -- edx : receiver |
| 1069 // -- esp[0] : return address | 1073 // -- esp[0] : return address |
| 1070 // ----------------------------------- | 1074 // ----------------------------------- |
| 1071 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); | 1075 Code::Flags flags = Code::ComputeFlags( |
| 1076 Code::HANDLER, MONOMORPHIC, extra_ic_state, |
| 1077 Code::NORMAL, Code::STORE_IC); |
| 1072 masm->isolate()->stub_cache()->GenerateProbe( | 1078 masm->isolate()->stub_cache()->GenerateProbe( |
| 1073 masm, flags, edx, ecx, ebx, no_reg); | 1079 masm, flags, edx, ecx, ebx, no_reg); |
| 1074 | 1080 |
| 1075 // Cache miss: Jump to runtime. | 1081 // Cache miss: Jump to runtime. |
| 1076 GenerateMiss(masm); | 1082 GenerateMiss(masm); |
| 1077 } | 1083 } |
| 1078 | 1084 |
| 1079 | 1085 |
| 1080 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1086 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 1081 // ----------- S t a t e ------------- | 1087 // ----------- S t a t e ------------- |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1300 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1306 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
| 1301 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1307 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1302 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1308 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1303 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1309 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1304 } | 1310 } |
| 1305 | 1311 |
| 1306 | 1312 |
| 1307 } } // namespace v8::internal | 1313 } } // namespace v8::internal |
| 1308 | 1314 |
| 1309 #endif // V8_TARGET_ARCH_IA32 | 1315 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |