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

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

Issue 163363003: Don't mix handler flags into regular flag compuation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/type-info.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 // 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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, 976 void LoadIC::GenerateMegamorphic(MacroAssembler* masm,
977 ExtraICState extra_state) { 977 ExtraICState extra_state) {
978 // ----------- S t a t e ------------- 978 // ----------- S t a t e -------------
979 // -- rax : receiver 979 // -- rax : receiver
980 // -- rcx : name 980 // -- rcx : name
981 // -- rsp[0] : return address 981 // -- rsp[0] : return address
982 // ----------------------------------- 982 // -----------------------------------
983 983
984 // Probe the stub cache. 984 // Probe the stub cache.
985 Code::Flags flags = Code::ComputeFlags( 985 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC, extra_state);
986 Code::HANDLER, MONOMORPHIC, extra_state,
987 Code::NORMAL, Code::LOAD_IC);
988 masm->isolate()->stub_cache()->GenerateProbe( 986 masm->isolate()->stub_cache()->GenerateProbe(
989 masm, flags, rax, rcx, rbx, rdx); 987 masm, flags, rax, rcx, rbx, rdx);
990 988
991 GenerateMiss(masm); 989 GenerateMiss(masm);
992 } 990 }
993 991
994 992
995 void LoadIC::GenerateNormal(MacroAssembler* masm) { 993 void LoadIC::GenerateNormal(MacroAssembler* masm) {
996 // ----------- S t a t e ------------- 994 // ----------- S t a t e -------------
997 // -- rax : receiver 995 // -- rax : receiver
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 __ push(rdx); // receiver 1083 __ push(rdx); // receiver
1086 __ push(rax); // name 1084 __ push(rax); // name
1087 __ PushReturnAddressFrom(rbx); 1085 __ PushReturnAddressFrom(rbx);
1088 1086
1089 // Perform tail call to the entry. 1087 // Perform tail call to the entry.
1090 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); 1088 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1);
1091 } 1089 }
1092 1090
1093 1091
1094 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, 1092 void StoreIC::GenerateMegamorphic(MacroAssembler* masm,
1095 ExtraICState extra_ic_state) { 1093 ExtraICState extra_state) {
1096 // ----------- S t a t e ------------- 1094 // ----------- S t a t e -------------
1097 // -- rax : value 1095 // -- rax : value
1098 // -- rcx : name 1096 // -- rcx : name
1099 // -- rdx : receiver 1097 // -- rdx : receiver
1100 // -- rsp[0] : return address 1098 // -- rsp[0] : return address
1101 // ----------------------------------- 1099 // -----------------------------------
1102 1100
1103 // Get the receiver from the stack and probe the stub cache. 1101 // Get the receiver from the stack and probe the stub cache.
1104 Code::Flags flags = Code::ComputeFlags( 1102 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC, extra_state);
1105 Code::HANDLER, MONOMORPHIC, extra_ic_state,
1106 Code::NORMAL, Code::STORE_IC);
1107 masm->isolate()->stub_cache()->GenerateProbe( 1103 masm->isolate()->stub_cache()->GenerateProbe(
1108 masm, flags, rdx, rcx, rbx, no_reg); 1104 masm, flags, rdx, rcx, rbx, no_reg);
1109 1105
1110 // Cache miss: Jump to runtime. 1106 // Cache miss: Jump to runtime.
1111 GenerateMiss(masm); 1107 GenerateMiss(masm);
1112 } 1108 }
1113 1109
1114 1110
1115 void StoreIC::GenerateMiss(MacroAssembler* masm) { 1111 void StoreIC::GenerateMiss(MacroAssembler* masm) {
1116 // ----------- S t a t e ------------- 1112 // ----------- S t a t e -------------
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1323 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1328 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1324 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1329 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1325 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1330 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1326 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1331 } 1327 }
1332 1328
1333 1329
1334 } } // namespace v8::internal 1330 } } // namespace v8::internal
1335 1331
1336 #endif // V8_TARGET_ARCH_X64 1332 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698