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/ia32/code-stubs-ia32.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/ia32/builtins-ia32.cc ('k') | src/ia32/codegen-ia32.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 4663 matching lines...) Expand 10 before | Expand all | Expand 10 after
4674 __ InvokeFunction(edi, actual, JUMP_FUNCTION); 4674 __ InvokeFunction(edi, actual, JUMP_FUNCTION);
4675 4675
4676 // Slow-case: Non-function called. 4676 // Slow-case: Non-function called.
4677 __ bind(&slow); 4677 __ bind(&slow);
4678 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead 4678 // CALL_NON_FUNCTION expects the non-function callee as receiver (instead
4679 // of the original receiver from the call site). 4679 // of the original receiver from the call site).
4680 __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi); 4680 __ mov(Operand(esp, (argc_ + 1) * kPointerSize), edi);
4681 __ Set(eax, Immediate(argc_)); 4681 __ Set(eax, Immediate(argc_));
4682 __ Set(ebx, Immediate(0)); 4682 __ Set(ebx, Immediate(0));
4683 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); 4683 __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION);
4684 Handle<Code> adaptor(masm->isolate()->builtins()->builtin( 4684 Handle<Code> adaptor =
4685 Builtins::ArgumentsAdaptorTrampoline)); 4685 masm->isolate()->builtins()->ArgumentsAdaptorTrampoline();
4686 __ jmp(adaptor, RelocInfo::CODE_TARGET); 4686 __ jmp(adaptor, RelocInfo::CODE_TARGET);
4687 } 4687 }
4688 4688
4689 4689
4690 bool CEntryStub::NeedsImmovableCode() { 4690 bool CEntryStub::NeedsImmovableCode() {
4691 return false; 4691 return false;
4692 } 4692 }
4693 4693
4694 4694
4695 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { 4695 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
4943 4943
4944 // Fake a receiver (NULL). 4944 // Fake a receiver (NULL).
4945 __ push(Immediate(0)); // receiver 4945 __ push(Immediate(0)); // receiver
4946 4946
4947 // Invoke the function by calling through JS entry trampoline 4947 // Invoke the function by calling through JS entry trampoline
4948 // builtin and pop the faked function when we return. Notice that we 4948 // builtin and pop the faked function when we return. Notice that we
4949 // cannot store a reference to the trampoline code directly in this 4949 // cannot store a reference to the trampoline code directly in this
4950 // stub, because the builtin stubs may not have been generated yet. 4950 // stub, because the builtin stubs may not have been generated yet.
4951 if (is_construct) { 4951 if (is_construct) {
4952 ExternalReference construct_entry( 4952 ExternalReference construct_entry(
4953 Builtins::JSConstructEntryTrampoline, 4953 Builtins::kJSConstructEntryTrampoline,
4954 masm->isolate()); 4954 masm->isolate());
4955 __ mov(edx, Immediate(construct_entry)); 4955 __ mov(edx, Immediate(construct_entry));
4956 } else { 4956 } else {
4957 ExternalReference entry(Builtins::JSEntryTrampoline, 4957 ExternalReference entry(Builtins::kJSEntryTrampoline,
4958 masm->isolate()); 4958 masm->isolate());
4959 __ mov(edx, Immediate(entry)); 4959 __ mov(edx, Immediate(entry));
4960 } 4960 }
4961 __ mov(edx, Operand(edx, 0)); // deref address 4961 __ mov(edx, Operand(edx, 0)); // deref address
4962 __ lea(edx, FieldOperand(edx, Code::kHeaderSize)); 4962 __ lea(edx, FieldOperand(edx, Code::kHeaderSize));
4963 __ call(Operand(edx)); 4963 __ call(Operand(edx));
4964 4964
4965 // Unlink this frame from the handler chain. 4965 // Unlink this frame from the handler chain.
4966 __ pop(Operand::StaticVariable(ExternalReference( 4966 __ pop(Operand::StaticVariable(ExternalReference(
4967 Isolate::k_handler_address, 4967 Isolate::k_handler_address,
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
6489 // Do a tail call to the rewritten stub. 6489 // Do a tail call to the rewritten stub.
6490 __ jmp(Operand(edi)); 6490 __ jmp(Operand(edi));
6491 } 6491 }
6492 6492
6493 6493
6494 #undef __ 6494 #undef __
6495 6495
6496 } } // namespace v8::internal 6496 } } // namespace v8::internal
6497 6497
6498 #endif // V8_TARGET_ARCH_IA32 6498 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698