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

Side by Side Diff: src/x64/virtual-frame-x64.cc

Issue 2853003: Port KeyedCallIC implementation to x64 and ARM.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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/x64/virtual-frame-x64.h ('k') | test/mjsunit/keyed-call-generic.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 Result name = Pop(); 1157 Result name = Pop();
1158 // Spill args, receiver, and function. The call will drop args and 1158 // Spill args, receiver, and function. The call will drop args and
1159 // receiver. 1159 // receiver.
1160 PrepareForCall(arg_count + 1, arg_count + 1); 1160 PrepareForCall(arg_count + 1, arg_count + 1);
1161 name.ToRegister(rcx); 1161 name.ToRegister(rcx);
1162 name.Unuse(); 1162 name.Unuse();
1163 return RawCallCodeObject(ic, mode); 1163 return RawCallCodeObject(ic, mode);
1164 } 1164 }
1165 1165
1166 1166
1167 Result VirtualFrame::CallKeyedCallIC(RelocInfo::Mode mode,
1168 int arg_count,
1169 int loop_nesting) {
1170 // Function name, arguments, and receiver are found on top of the frame
1171 // and dropped by the call. The IC expects the name in rcx and the rest
1172 // on the stack, and drops them all.
1173 InLoopFlag in_loop = loop_nesting > 0 ? IN_LOOP : NOT_IN_LOOP;
1174 Handle<Code> ic =
1175 cgen()->ComputeKeyedCallInitialize(arg_count, in_loop);
1176 Result name = Pop();
1177 // Spill args, receiver, and function. The call will drop args and
1178 // receiver.
1179 PrepareForCall(arg_count + 1, arg_count + 1);
1180 name.ToRegister(rcx);
1181 name.Unuse();
1182 return RawCallCodeObject(ic, mode);
1183 }
1184
1185
1167 Result VirtualFrame::CallConstructor(int arg_count) { 1186 Result VirtualFrame::CallConstructor(int arg_count) {
1168 // Arguments, receiver, and function are on top of the frame. The 1187 // Arguments, receiver, and function are on top of the frame. The
1169 // IC expects arg count in rax, function in rdi, and the arguments 1188 // IC expects arg count in rax, function in rdi, and the arguments
1170 // and receiver on the stack. 1189 // and receiver on the stack.
1171 Handle<Code> ic(Builtins::builtin(Builtins::JSConstructCall)); 1190 Handle<Code> ic(Builtins::builtin(Builtins::JSConstructCall));
1172 // Duplicate the function before preparing the frame. 1191 // Duplicate the function before preparing the frame.
1173 PushElementAt(arg_count + 1); 1192 PushElementAt(arg_count + 1);
1174 Result function = Pop(); 1193 Result function = Pop();
1175 PrepareForCall(arg_count + 1, arg_count + 1); // Spill args and receiver. 1194 PrepareForCall(arg_count + 1, arg_count + 1); // Spill args and receiver.
1176 function.ToRegister(rdi); 1195 function.ToRegister(rdi);
(...skipping 18 matching lines...) Expand all
1195 Adjust(kHandlerSize - 1); 1214 Adjust(kHandlerSize - 1);
1196 __ PushTryHandler(IN_JAVASCRIPT, type); 1215 __ PushTryHandler(IN_JAVASCRIPT, type);
1197 } 1216 }
1198 1217
1199 1218
1200 #undef __ 1219 #undef __
1201 1220
1202 } } // namespace v8::internal 1221 } } // namespace v8::internal
1203 1222
1204 #endif // V8_TARGET_ARCH_X64 1223 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/virtual-frame-x64.h ('k') | test/mjsunit/keyed-call-generic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698