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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests and lint. Created 9 years, 9 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/builtins-x64.cc ('k') | src/x64/codegen-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 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after
3325 __ InvokeFunction(rdi, actual, JUMP_FUNCTION); 3325 __ InvokeFunction(rdi, actual, JUMP_FUNCTION);
3326 3326
3327 // Slow-case: Non-function called. 3327 // Slow-case: Non-function called.
3328 __ bind(&slow); 3328 __ bind(&slow);
3329 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead 3329 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead
3330 // of the original receiver from the call site). 3330 // of the original receiver from the call site).
3331 __ movq(Operand(rsp, (argc_ + 1) * kPointerSize), rdi); 3331 __ movq(Operand(rsp, (argc_ + 1) * kPointerSize), rdi);
3332 __ Set(rax, argc_); 3332 __ Set(rax, argc_);
3333 __ Set(rbx, 0); 3333 __ Set(rbx, 0);
3334 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION); 3334 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION);
3335 Handle<Code> adaptor(Isolate::Current()->builtins()->builtin( 3335 Handle<Code> adaptor =
3336 Builtins::ArgumentsAdaptorTrampoline)); 3336 Isolate::Current()->builtins()->ArgumentsAdaptorTrampoline();
3337 __ Jump(adaptor, RelocInfo::CODE_TARGET); 3337 __ Jump(adaptor, RelocInfo::CODE_TARGET);
3338 } 3338 }
3339 3339
3340 3340
3341 bool CEntryStub::NeedsImmovableCode() { 3341 bool CEntryStub::NeedsImmovableCode() {
3342 return false; 3342 return false;
3343 } 3343 }
3344 3344
3345 3345
3346 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { 3346 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
3649 3649
3650 // Fake a receiver (NULL). 3650 // Fake a receiver (NULL).
3651 __ push(Immediate(0)); // receiver 3651 __ push(Immediate(0)); // receiver
3652 3652
3653 // Invoke the function by calling through JS entry trampoline 3653 // Invoke the function by calling through JS entry trampoline
3654 // builtin and pop the faked function when we return. We load the address 3654 // builtin and pop the faked function when we return. We load the address
3655 // from an external reference instead of inlining the call target address 3655 // from an external reference instead of inlining the call target address
3656 // directly in the code, because the builtin stubs may not have been 3656 // directly in the code, because the builtin stubs may not have been
3657 // generated yet at the time this code is generated. 3657 // generated yet at the time this code is generated.
3658 if (is_construct) { 3658 if (is_construct) {
3659 ExternalReference construct_entry(Builtins::JSConstructEntryTrampoline, 3659 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline,
3660 isolate); 3660 isolate);
3661 __ Load(rax, construct_entry); 3661 __ Load(rax, construct_entry);
3662 } else { 3662 } else {
3663 ExternalReference entry(Builtins::JSEntryTrampoline, isolate); 3663 ExternalReference entry(Builtins::kJSEntryTrampoline, isolate);
3664 __ Load(rax, entry); 3664 __ Load(rax, entry);
3665 } 3665 }
3666 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize)); 3666 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize));
3667 __ call(kScratchRegister); 3667 __ call(kScratchRegister);
3668 3668
3669 // Unlink this frame from the handler chain. 3669 // Unlink this frame from the handler chain.
3670 Operand handler_operand = 3670 Operand handler_operand =
3671 masm->ExternalOperand(ExternalReference(Isolate::k_handler_address, 3671 masm->ExternalOperand(ExternalReference(Isolate::k_handler_address,
3672 isolate)); 3672 isolate));
3673 __ pop(handler_operand); 3673 __ pop(handler_operand);
(...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after
5089 // Do a tail call to the rewritten stub. 5089 // Do a tail call to the rewritten stub.
5090 __ jmp(rdi); 5090 __ jmp(rdi);
5091 } 5091 }
5092 5092
5093 5093
5094 #undef __ 5094 #undef __
5095 5095
5096 } } // namespace v8::internal 5096 } } // namespace v8::internal
5097 5097
5098 #endif // V8_TARGET_ARCH_X64 5098 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698