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

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

Issue 91803003: Move responsibility for definition of ExtraICState bits into the ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A couple more nits. Created 7 years 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/type-info.cc ('k') | src/x64/stub-cache-x64.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 // 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow, 826 KeyedStoreGenerateGenericHelper(masm, &fast_object_grow, &fast_double_grow,
827 &slow, kDontCheckMap, kIncrementLength); 827 &slow, kDontCheckMap, kIncrementLength);
828 } 828 }
829 829
830 830
831 // The generated code does not accept smi keys. 831 // The generated code does not accept smi keys.
832 // The generated code falls through if both probes miss. 832 // The generated code falls through if both probes miss.
833 void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm, 833 void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm,
834 int argc, 834 int argc,
835 Code::Kind kind, 835 Code::Kind kind,
836 Code::ExtraICState extra_state) { 836 ExtraICState extra_state) {
837 // ----------- S t a t e ------------- 837 // ----------- S t a t e -------------
838 // rcx : function name 838 // rcx : function name
839 // rdx : receiver 839 // rdx : receiver
840 // ----------------------------------- 840 // -----------------------------------
841 Label number, non_number, non_string, boolean, probe, miss; 841 Label number, non_number, non_string, boolean, probe, miss;
842 842
843 // Probe the stub cache. 843 // Probe the stub cache.
844 Code::Flags flags = Code::ComputeFlags(kind, 844 Code::Flags flags = Code::ComputeFlags(kind,
845 MONOMORPHIC, 845 MONOMORPHIC,
846 extra_state, 846 extra_state,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 939
940 GenerateFunctionTailCall(masm, argc, &miss); 940 GenerateFunctionTailCall(masm, argc, &miss);
941 941
942 __ bind(&miss); 942 __ bind(&miss);
943 } 943 }
944 944
945 945
946 void CallICBase::GenerateMiss(MacroAssembler* masm, 946 void CallICBase::GenerateMiss(MacroAssembler* masm,
947 int argc, 947 int argc,
948 IC::UtilityId id, 948 IC::UtilityId id,
949 Code::ExtraICState extra_state) { 949 ExtraICState extra_state) {
950 // ----------- S t a t e ------------- 950 // ----------- S t a t e -------------
951 // rcx : function name 951 // rcx : function name
952 // rsp[0] : return address 952 // rsp[0] : return address
953 // rsp[8] : argument argc 953 // rsp[8] : argument argc
954 // rsp[16] : argument argc - 1 954 // rsp[16] : argument argc - 1
955 // ... 955 // ...
956 // rsp[argc * 8] : argument 1 956 // rsp[argc * 8] : argument 1
957 // rsp[(argc + 1) * 8] : argument 0 = receiver 957 // rsp[(argc + 1) * 8] : argument 0 = receiver
958 // ----------------------------------- 958 // -----------------------------------
959 959
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 __ InvokeFunction(rdi, 1011 __ InvokeFunction(rdi,
1012 actual, 1012 actual,
1013 JUMP_FUNCTION, 1013 JUMP_FUNCTION,
1014 NullCallWrapper(), 1014 NullCallWrapper(),
1015 call_kind); 1015 call_kind);
1016 } 1016 }
1017 1017
1018 1018
1019 void CallIC::GenerateMegamorphic(MacroAssembler* masm, 1019 void CallIC::GenerateMegamorphic(MacroAssembler* masm,
1020 int argc, 1020 int argc,
1021 Code::ExtraICState extra_ic_state) { 1021 ExtraICState extra_ic_state) {
1022 // ----------- S t a t e ------------- 1022 // ----------- S t a t e -------------
1023 // rcx : function name 1023 // rcx : function name
1024 // rsp[0] : return address 1024 // rsp[0] : return address
1025 // rsp[8] : argument argc 1025 // rsp[8] : argument argc
1026 // rsp[16] : argument argc - 1 1026 // rsp[16] : argument argc - 1
1027 // ... 1027 // ...
1028 // rsp[argc * 8] : argument 1 1028 // rsp[argc * 8] : argument 1
1029 // rsp[(argc + 1) * 8] : argument 0 = receiver 1029 // rsp[(argc + 1) * 8] : argument 0 = receiver
1030 // ----------------------------------- 1030 // -----------------------------------
1031 1031
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 1120
1121 GenerateDictionaryLoad(masm, &slow_load, rbx, rcx, rax, rdi, rdi); 1121 GenerateDictionaryLoad(masm, &slow_load, rbx, rcx, rax, rdi, rdi);
1122 __ IncrementCounter(counters->keyed_call_generic_lookup_dict(), 1); 1122 __ IncrementCounter(counters->keyed_call_generic_lookup_dict(), 1);
1123 __ jmp(&do_call); 1123 __ jmp(&do_call);
1124 1124
1125 __ bind(&lookup_monomorphic_cache); 1125 __ bind(&lookup_monomorphic_cache);
1126 __ IncrementCounter(counters->keyed_call_generic_lookup_cache(), 1); 1126 __ IncrementCounter(counters->keyed_call_generic_lookup_cache(), 1);
1127 GenerateMonomorphicCacheProbe(masm, 1127 GenerateMonomorphicCacheProbe(masm,
1128 argc, 1128 argc,
1129 Code::KEYED_CALL_IC, 1129 Code::KEYED_CALL_IC,
1130 Code::kNoExtraICState); 1130 kNoExtraICState);
1131 // Fall through on miss. 1131 // Fall through on miss.
1132 1132
1133 __ bind(&slow_call); 1133 __ bind(&slow_call);
1134 // This branch is taken if: 1134 // This branch is taken if:
1135 // - the receiver requires boxing or access check, 1135 // - the receiver requires boxing or access check,
1136 // - the key is neither smi nor a unique name, 1136 // - the key is neither smi nor a unique name,
1137 // - the value loaded is not a function, 1137 // - the value loaded is not a function,
1138 // - there is hope that the runtime will create a monomorphic call stub 1138 // - there is hope that the runtime will create a monomorphic call stub
1139 // that will get fetched next time. 1139 // that will get fetched next time.
1140 __ IncrementCounter(counters->keyed_call_generic_slow(), 1); 1140 __ IncrementCounter(counters->keyed_call_generic_slow(), 1);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 1347
1348 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 1348 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
1349 // ----------- S t a t e ------------- 1349 // ----------- S t a t e -------------
1350 // -- rax : receiver 1350 // -- rax : receiver
1351 // -- rcx : name 1351 // -- rcx : name
1352 // -- rsp[0] : return address 1352 // -- rsp[0] : return address
1353 // ----------------------------------- 1353 // -----------------------------------
1354 1354
1355 // Probe the stub cache. 1355 // Probe the stub cache.
1356 Code::Flags flags = Code::ComputeFlags( 1356 Code::Flags flags = Code::ComputeFlags(
1357 Code::HANDLER, MONOMORPHIC, Code::kNoExtraICState, 1357 Code::HANDLER, MONOMORPHIC, kNoExtraICState,
1358 Code::NORMAL, Code::LOAD_IC); 1358 Code::NORMAL, Code::LOAD_IC);
1359 masm->isolate()->stub_cache()->GenerateProbe( 1359 masm->isolate()->stub_cache()->GenerateProbe(
1360 masm, flags, rax, rcx, rbx, rdx); 1360 masm, flags, rax, rcx, rbx, rdx);
1361 1361
1362 GenerateMiss(masm); 1362 GenerateMiss(masm);
1363 } 1363 }
1364 1364
1365 1365
1366 void LoadIC::GenerateNormal(MacroAssembler* masm) { 1366 void LoadIC::GenerateNormal(MacroAssembler* masm) {
1367 // ----------- S t a t e ------------- 1367 // ----------- S t a t e -------------
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1698 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1699 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1699 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1700 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1700 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1701 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1701 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1702 } 1702 }
1703 1703
1704 1704
1705 } } // namespace v8::internal 1705 } } // namespace v8::internal
1706 1706
1707 #endif // V8_TARGET_ARCH_X64 1707 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698