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/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: Removing Handle suffix and renaming enum entries 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
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 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after
3318 __ InvokeFunction(rdi, actual, JUMP_FUNCTION); 3318 __ InvokeFunction(rdi, actual, JUMP_FUNCTION);
3319 3319
3320 // Slow-case: Non-function called. 3320 // Slow-case: Non-function called.
3321 __ bind(&slow); 3321 __ bind(&slow);
3322 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead 3322 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead
3323 // of the original receiver from the call site). 3323 // of the original receiver from the call site).
3324 __ movq(Operand(rsp, (argc_ + 1) * kPointerSize), rdi); 3324 __ movq(Operand(rsp, (argc_ + 1) * kPointerSize), rdi);
3325 __ Set(rax, argc_); 3325 __ Set(rax, argc_);
3326 __ Set(rbx, 0); 3326 __ Set(rbx, 0);
3327 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION); 3327 __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION);
3328 Handle<Code> adaptor(Isolate::Current()->builtins()->builtin( 3328 Handle<Code> adaptor =
3329 Builtins::ArgumentsAdaptorTrampoline)); 3329 Isolate::Current()->builtins()->ArgumentsAdaptorTrampoline();
3330 __ Jump(adaptor, RelocInfo::CODE_TARGET); 3330 __ Jump(adaptor, RelocInfo::CODE_TARGET);
3331 } 3331 }
3332 3332
3333 3333
3334 bool CEntryStub::NeedsImmovableCode() { 3334 bool CEntryStub::NeedsImmovableCode() {
3335 return false; 3335 return false;
3336 } 3336 }
3337 3337
3338 3338
3339 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { 3339 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 3638
3639 // Fake a receiver (NULL). 3639 // Fake a receiver (NULL).
3640 __ push(Immediate(0)); // receiver 3640 __ push(Immediate(0)); // receiver
3641 3641
3642 // Invoke the function by calling through JS entry trampoline 3642 // Invoke the function by calling through JS entry trampoline
3643 // builtin and pop the faked function when we return. We load the address 3643 // builtin and pop the faked function when we return. We load the address
3644 // from an external reference instead of inlining the call target address 3644 // from an external reference instead of inlining the call target address
3645 // directly in the code, because the builtin stubs may not have been 3645 // directly in the code, because the builtin stubs may not have been
3646 // generated yet at the time this code is generated. 3646 // generated yet at the time this code is generated.
3647 if (is_construct) { 3647 if (is_construct) {
3648 ExternalReference construct_entry(Builtins::JSConstructEntryTrampoline, 3648 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline,
3649 isolate); 3649 isolate);
3650 __ load_rax(construct_entry); 3650 __ load_rax(construct_entry);
3651 } else { 3651 } else {
3652 ExternalReference entry(Builtins::JSEntryTrampoline, isolate); 3652 ExternalReference entry(Builtins::kJSEntryTrampoline, isolate);
3653 __ load_rax(entry); 3653 __ load_rax(entry);
3654 } 3654 }
3655 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize)); 3655 __ lea(kScratchRegister, FieldOperand(rax, Code::kHeaderSize));
3656 __ call(kScratchRegister); 3656 __ call(kScratchRegister);
3657 3657
3658 // Unlink this frame from the handler chain. 3658 // Unlink this frame from the handler chain.
3659 __ movq(kScratchRegister, 3659 __ movq(kScratchRegister,
3660 ExternalReference(Isolate::k_handler_address, isolate)); 3660 ExternalReference(Isolate::k_handler_address, isolate));
3661 __ pop(Operand(kScratchRegister, 0)); 3661 __ pop(Operand(kScratchRegister, 0));
3662 // Pop next_sp. 3662 // Pop next_sp.
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
5073 // Do a tail call to the rewritten stub. 5073 // Do a tail call to the rewritten stub.
5074 __ jmp(rdi); 5074 __ jmp(rdi);
5075 } 5075 }
5076 5076
5077 5077
5078 #undef __ 5078 #undef __
5079 5079
5080 } } // namespace v8::internal 5080 } } // namespace v8::internal
5081 5081
5082 #endif // V8_TARGET_ARCH_X64 5082 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/builtins.cc ('K') | « 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