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

Side by Side Diff: src/x64/macro-assembler-x64.h

Issue 7039036: Fix calls of strict mode function with an implicit receiver. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 7 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/lithium-x64.cc ('k') | src/x64/macro-assembler-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 void InitializeRootRegister() { 234 void InitializeRootRegister() {
235 ExternalReference roots_address = 235 ExternalReference roots_address =
236 ExternalReference::roots_address(isolate()); 236 ExternalReference::roots_address(isolate());
237 movq(kRootRegister, roots_address); 237 movq(kRootRegister, roots_address);
238 addq(kRootRegister, Immediate(kRootRegisterBias)); 238 addq(kRootRegister, Immediate(kRootRegisterBias));
239 } 239 }
240 240
241 // --------------------------------------------------------------------------- 241 // ---------------------------------------------------------------------------
242 // JavaScript invokes 242 // JavaScript invokes
243 243
244 // Setup call kind marking in rcx. The method takes rcx as an
245 // explicit first parameter to make the code more readable at the
246 // call sites.
247 void SetCallKind(Register dst, CallKind kind);
248
244 // Invoke the JavaScript function code by either calling or jumping. 249 // Invoke the JavaScript function code by either calling or jumping.
245 void InvokeCode(Register code, 250 void InvokeCode(Register code,
246 const ParameterCount& expected, 251 const ParameterCount& expected,
247 const ParameterCount& actual, 252 const ParameterCount& actual,
248 InvokeFlag flag, 253 InvokeFlag flag,
249 const CallWrapper& call_wrapper = NullCallWrapper()); 254 const CallWrapper& call_wrapper = NullCallWrapper(),
255 CallKind call_kind = CALL_AS_METHOD);
250 256
251 void InvokeCode(Handle<Code> code, 257 void InvokeCode(Handle<Code> code,
252 const ParameterCount& expected, 258 const ParameterCount& expected,
253 const ParameterCount& actual, 259 const ParameterCount& actual,
254 RelocInfo::Mode rmode, 260 RelocInfo::Mode rmode,
255 InvokeFlag flag, 261 InvokeFlag flag,
256 const CallWrapper& call_wrapper = NullCallWrapper()); 262 const CallWrapper& call_wrapper = NullCallWrapper(),
263 CallKind call_kind = CALL_AS_METHOD);
257 264
258 // Invoke the JavaScript function in the given register. Changes the 265 // Invoke the JavaScript function in the given register. Changes the
259 // current context to the context in the function before invoking. 266 // current context to the context in the function before invoking.
260 void InvokeFunction(Register function, 267 void InvokeFunction(Register function,
261 const ParameterCount& actual, 268 const ParameterCount& actual,
262 InvokeFlag flag, 269 InvokeFlag flag,
263 const CallWrapper& call_wrapper = NullCallWrapper()); 270 const CallWrapper& call_wrapper = NullCallWrapper(),
271 CallKind call_kind = CALL_AS_METHOD);
264 272
265 void InvokeFunction(JSFunction* function, 273 void InvokeFunction(JSFunction* function,
266 const ParameterCount& actual, 274 const ParameterCount& actual,
267 InvokeFlag flag, 275 InvokeFlag flag,
268 const CallWrapper& call_wrapper = NullCallWrapper()); 276 const CallWrapper& call_wrapper = NullCallWrapper());
269 277
270 // Invoke specified builtin JavaScript function. Adds an entry to 278 // Invoke specified builtin JavaScript function. Adds an entry to
271 // the unresolved list if the name does not resolve. 279 // the unresolved list if the name does not resolve.
272 void InvokeBuiltin(Builtins::JavaScript id, 280 void InvokeBuiltin(Builtins::JavaScript id,
273 InvokeFlag flag, 281 InvokeFlag flag,
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 // This handle will be patched with the code object on installation. 1150 // This handle will be patched with the code object on installation.
1143 Handle<Object> code_object_; 1151 Handle<Object> code_object_;
1144 1152
1145 // Helper functions for generating invokes. 1153 // Helper functions for generating invokes.
1146 void InvokePrologue(const ParameterCount& expected, 1154 void InvokePrologue(const ParameterCount& expected,
1147 const ParameterCount& actual, 1155 const ParameterCount& actual,
1148 Handle<Code> code_constant, 1156 Handle<Code> code_constant,
1149 Register code_register, 1157 Register code_register,
1150 Label* done, 1158 Label* done,
1151 InvokeFlag flag, 1159 InvokeFlag flag,
1152 const CallWrapper& call_wrapper, 1160 Label::Distance near_jump = Label::kFar,
1153 Label::Distance near_jump = Label::kFar); 1161 const CallWrapper& call_wrapper = NullCallWrapper(),
1162 CallKind call_kind = CALL_AS_METHOD);
1154 1163
1155 // Activation support. 1164 // Activation support.
1156 void EnterFrame(StackFrame::Type type); 1165 void EnterFrame(StackFrame::Type type);
1157 void LeaveFrame(StackFrame::Type type); 1166 void LeaveFrame(StackFrame::Type type);
1158 1167
1159 void EnterExitFramePrologue(bool save_rax); 1168 void EnterExitFramePrologue(bool save_rax);
1160 1169
1161 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack 1170 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
1162 // accessible via StackSpaceOperand. 1171 // accessible via StackSpaceOperand.
1163 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); 1172 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 masm->popfd(); \ 1281 masm->popfd(); \
1273 } \ 1282 } \
1274 masm-> 1283 masm->
1275 #else 1284 #else
1276 #define ACCESS_MASM(masm) masm-> 1285 #define ACCESS_MASM(masm) masm->
1277 #endif 1286 #endif
1278 1287
1279 } } // namespace v8::internal 1288 } } // namespace v8::internal
1280 1289
1281 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1290 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698