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) { | |
952 // ----------- S t a t e ------------- | 951 // ----------- S t a t e ------------- |
953 // -- ecx : name | 952 // -- ecx : name |
954 // -- edx : receiver | 953 // -- edx : receiver |
955 // -- esp[0] : return address | 954 // -- esp[0] : return address |
956 // ----------------------------------- | 955 // ----------------------------------- |
957 | 956 |
958 // Probe the stub cache. | 957 // Probe the stub cache. |
959 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state); | 958 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); |
960 masm->isolate()->stub_cache()->GenerateProbe( | 959 masm->isolate()->stub_cache()->GenerateProbe( |
961 masm, flags, edx, ecx, ebx, eax); | 960 masm, flags, edx, ecx, ebx, eax); |
962 | 961 |
963 // Cache miss: Jump to runtime. | 962 // Cache miss: Jump to runtime. |
964 GenerateMiss(masm); | 963 GenerateMiss(masm); |
965 } | 964 } |
966 | 965 |
967 | 966 |
968 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 967 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
969 // ----------- S t a t e ------------- | 968 // ----------- S t a t e ------------- |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 __ pop(ebx); | 1054 __ pop(ebx); |
1056 __ push(edx); // receiver | 1055 __ push(edx); // receiver |
1057 __ push(ecx); // name | 1056 __ push(ecx); // name |
1058 __ push(ebx); // return address | 1057 __ push(ebx); // return address |
1059 | 1058 |
1060 // Perform tail call to the entry. | 1059 // Perform tail call to the entry. |
1061 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 1060 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
1062 } | 1061 } |
1063 | 1062 |
1064 | 1063 |
1065 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1064 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
1066 ExtraICState extra_state) { | |
1067 // ----------- S t a t e ------------- | 1065 // ----------- S t a t e ------------- |
1068 // -- eax : value | 1066 // -- eax : value |
1069 // -- ecx : name | 1067 // -- ecx : name |
1070 // -- edx : receiver | 1068 // -- edx : receiver |
1071 // -- esp[0] : return address | 1069 // -- esp[0] : return address |
1072 // ----------------------------------- | 1070 // ----------------------------------- |
1073 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state); | 1071 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); |
1074 masm->isolate()->stub_cache()->GenerateProbe( | 1072 masm->isolate()->stub_cache()->GenerateProbe( |
1075 masm, flags, edx, ecx, ebx, no_reg); | 1073 masm, flags, edx, ecx, ebx, no_reg); |
1076 | 1074 |
1077 // Cache miss: Jump to runtime. | 1075 // Cache miss: Jump to runtime. |
1078 GenerateMiss(masm); | 1076 GenerateMiss(masm); |
1079 } | 1077 } |
1080 | 1078 |
1081 | 1079 |
1082 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1080 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
1083 // ----------- S t a t e ------------- | 1081 // ----------- S t a t e ------------- |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1300 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1303 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1301 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1304 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1302 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1305 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1303 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1306 } | 1304 } |
1307 | 1305 |
1308 | 1306 |
1309 } } // namespace v8::internal | 1307 } } // namespace v8::internal |
1310 | 1308 |
1311 #endif // V8_TARGET_ARCH_IA32 | 1309 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |