OLD | NEW |
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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 __ SmiToInteger32(rax, rax); | 239 __ SmiToInteger32(rax, rax); |
240 | 240 |
241 __ LeaveInternalFrame(); | 241 __ LeaveInternalFrame(); |
242 __ jmp(&patch_receiver); | 242 __ jmp(&patch_receiver); |
243 | 243 |
244 // Use the global receiver object from the called function as the receiver. | 244 // Use the global receiver object from the called function as the receiver. |
245 __ bind(&use_global_receiver); | 245 __ bind(&use_global_receiver); |
246 const int kGlobalIndex = | 246 const int kGlobalIndex = |
247 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 247 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
248 __ movq(rbx, FieldOperand(rsi, kGlobalIndex)); | 248 __ movq(rbx, FieldOperand(rsi, kGlobalIndex)); |
| 249 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalContextOffset)); |
| 250 __ movq(rbx, FieldOperand(rbx, kGlobalIndex)); |
249 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); | 251 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); |
250 | 252 |
251 __ bind(&patch_receiver); | 253 __ bind(&patch_receiver); |
252 __ movq(Operand(rsp, rax, times_pointer_size, 0), rbx); | 254 __ movq(Operand(rsp, rax, times_pointer_size, 0), rbx); |
253 | 255 |
254 __ bind(&done); | 256 __ bind(&done); |
255 } | 257 } |
256 | 258 |
257 // 4. Shift stuff one slot down the stack. | 259 // 4. Shift stuff one slot down the stack. |
258 { Label loop; | 260 { Label loop; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 __ push(rbx); | 395 __ push(rbx); |
394 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 396 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
395 __ movq(rbx, rax); | 397 __ movq(rbx, rax); |
396 __ jmp(&push_receiver); | 398 __ jmp(&push_receiver); |
397 | 399 |
398 // Use the current global receiver object as the receiver. | 400 // Use the current global receiver object as the receiver. |
399 __ bind(&use_global_receiver); | 401 __ bind(&use_global_receiver); |
400 const int kGlobalOffset = | 402 const int kGlobalOffset = |
401 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 403 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
402 __ movq(rbx, FieldOperand(rsi, kGlobalOffset)); | 404 __ movq(rbx, FieldOperand(rsi, kGlobalOffset)); |
| 405 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalContextOffset)); |
| 406 __ movq(rbx, FieldOperand(rbx, kGlobalOffset)); |
403 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); | 407 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); |
404 | 408 |
405 // Push the receiver. | 409 // Push the receiver. |
406 __ bind(&push_receiver); | 410 __ bind(&push_receiver); |
407 __ push(rbx); | 411 __ push(rbx); |
408 | 412 |
409 // Copy all arguments from the array to the stack. | 413 // Copy all arguments from the array to the stack. |
410 Label entry, loop; | 414 Label entry, loop; |
411 __ movq(rax, Operand(rbp, kIndexOffset)); | 415 __ movq(rax, Operand(rbp, kIndexOffset)); |
412 __ jmp(&entry); | 416 __ jmp(&entry); |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { | 1265 void Builtins::Generate_JSEntryTrampoline(MacroAssembler* masm) { |
1262 Generate_JSEntryTrampolineHelper(masm, false); | 1266 Generate_JSEntryTrampolineHelper(masm, false); |
1263 } | 1267 } |
1264 | 1268 |
1265 | 1269 |
1266 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { | 1270 void Builtins::Generate_JSConstructEntryTrampoline(MacroAssembler* masm) { |
1267 Generate_JSEntryTrampolineHelper(masm, true); | 1271 Generate_JSEntryTrampolineHelper(masm, true); |
1268 } | 1272 } |
1269 | 1273 |
1270 } } // namespace v8::internal | 1274 } } // namespace v8::internal |
OLD | NEW |