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

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: Port to x64 and arm. 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
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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 // This handle will be patched with the code object on installation. 1148 // This handle will be patched with the code object on installation.
1141 Handle<Object> code_object_; 1149 Handle<Object> code_object_;
1142 1150
1143 // Helper functions for generating invokes. 1151 // Helper functions for generating invokes.
1144 void InvokePrologue(const ParameterCount& expected, 1152 void InvokePrologue(const ParameterCount& expected,
1145 const ParameterCount& actual, 1153 const ParameterCount& actual,
1146 Handle<Code> code_constant, 1154 Handle<Code> code_constant,
1147 Register code_register, 1155 Register code_register,
1148 Label* done, 1156 Label* done,
1149 InvokeFlag flag, 1157 InvokeFlag flag,
1150 const CallWrapper& call_wrapper, 1158 Label::Distance near_jump = Label::kFar,
1151 Label::Distance near_jump = Label::kFar); 1159 const CallWrapper& call_wrapper = NullCallWrapper(),
1160 CallKind call_kind = CALL_AS_METHOD);
1152 1161
1153 // Activation support. 1162 // Activation support.
1154 void EnterFrame(StackFrame::Type type); 1163 void EnterFrame(StackFrame::Type type);
1155 void LeaveFrame(StackFrame::Type type); 1164 void LeaveFrame(StackFrame::Type type);
1156 1165
1157 void EnterExitFramePrologue(bool save_rax); 1166 void EnterExitFramePrologue(bool save_rax);
1158 1167
1159 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack 1168 // Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
1160 // accessible via StackSpaceOperand. 1169 // accessible via StackSpaceOperand.
1161 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles); 1170 void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1270 masm->popfd(); \ 1279 masm->popfd(); \
1271 } \ 1280 } \
1272 masm-> 1281 masm->
1273 #else 1282 #else
1274 #define ACCESS_MASM(masm) masm-> 1283 #define ACCESS_MASM(masm) masm->
1275 #endif 1284 #endif
1276 1285
1277 } } // namespace v8::internal 1286 } } // namespace v8::internal
1278 1287
1279 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1288 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698