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

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

Issue 2280007: Extend CallIC to support non-constant names.... (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/ia32/virtual-frame-ia32.h ('k') | src/ic.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 // Spill args, receiver, and function. The call will drop args and 1112 // Spill args, receiver, and function. The call will drop args and
1113 // receiver. 1113 // receiver.
1114 Result name = Pop(); 1114 Result name = Pop();
1115 PrepareForCall(arg_count + 1, arg_count + 1); // Arguments + receiver. 1115 PrepareForCall(arg_count + 1, arg_count + 1); // Arguments + receiver.
1116 name.ToRegister(ecx); 1116 name.ToRegister(ecx);
1117 name.Unuse(); 1117 name.Unuse();
1118 return RawCallCodeObject(ic, mode); 1118 return RawCallCodeObject(ic, mode);
1119 } 1119 }
1120 1120
1121 1121
1122 Result VirtualFrame::CallKeyedCallIC(RelocInfo::Mode mode,
1123 int arg_count,
1124 int loop_nesting) {
1125 // Function name, arguments, and receiver are on top of the frame.
1126 // The IC expects the name in ecx and the rest on the stack and
1127 // drops them all.
1128 InLoopFlag in_loop = loop_nesting > 0 ? IN_LOOP : NOT_IN_LOOP;
1129 Handle<Code> ic = cgen()->ComputeKeyedCallInitialize(arg_count, in_loop);
1130 // Spill args, receiver, and function. The call will drop args and
1131 // receiver.
1132 Result name = Pop();
1133 PrepareForCall(arg_count + 1, arg_count + 1); // Arguments + receiver.
1134 name.ToRegister(ecx);
1135 name.Unuse();
1136 return RawCallCodeObject(ic, mode);
1137 }
1138
1139
1122 Result VirtualFrame::CallConstructor(int arg_count) { 1140 Result VirtualFrame::CallConstructor(int arg_count) {
1123 // Arguments, receiver, and function are on top of the frame. The 1141 // Arguments, receiver, and function are on top of the frame. The
1124 // IC expects arg count in eax, function in edi, and the arguments 1142 // IC expects arg count in eax, function in edi, and the arguments
1125 // and receiver on the stack. 1143 // and receiver on the stack.
1126 Handle<Code> ic(Builtins::builtin(Builtins::JSConstructCall)); 1144 Handle<Code> ic(Builtins::builtin(Builtins::JSConstructCall));
1127 // Duplicate the function before preparing the frame. 1145 // Duplicate the function before preparing the frame.
1128 PushElementAt(arg_count + 1); 1146 PushElementAt(arg_count + 1);
1129 Result function = Pop(); 1147 Result function = Pop();
1130 PrepareForCall(arg_count + 1, arg_count + 1); // Spill args and receiver. 1148 PrepareForCall(arg_count + 1, arg_count + 1); // Spill args and receiver.
1131 function.ToRegister(edi); 1149 function.ToRegister(edi);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1307 } 1325 }
1308 UNREACHABLE(); 1326 UNREACHABLE();
1309 } 1327 }
1310 1328
1311 1329
1312 #undef __ 1330 #undef __
1313 1331
1314 } } // namespace v8::internal 1332 } } // namespace v8::internal
1315 1333
1316 #endif // V8_TARGET_ARCH_IA32 1334 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/virtual-frame-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698