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

Side by Side Diff: src/builtins-arm.cc

Issue 2884: Stop adapting the arguments passed to the builtin implementations... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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/builtins.cc ('k') | src/builtins-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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 22 matching lines...) Expand all
33 33
34 namespace v8 { namespace internal { 34 namespace v8 { namespace internal {
35 35
36 36
37 #define __ masm-> 37 #define __ masm->
38 38
39 39
40 void Builtins::Generate_Adaptor(MacroAssembler* masm, 40 void Builtins::Generate_Adaptor(MacroAssembler* masm,
41 int argc, 41 int argc,
42 CFunctionId id) { 42 CFunctionId id) {
43 // r0 contains the number of arguments excluding the receiver. 43 // TODO(1238487): Don't pass the function in a static variable.
44 // JumpToBuiltin expects r0 to contains the number of arguments
45 // including the receiver.
46 __ mov(r0, Operand(argc + 1));
47 __ mov(ip, Operand(ExternalReference::builtin_passed_function())); 44 __ mov(ip, Operand(ExternalReference::builtin_passed_function()));
48 __ str(r1, MemOperand(ip, 0)); 45 __ str(r1, MemOperand(ip, 0));
46
47 if (argc == -1) {
48 // The actual argument count has already been loaded into register
49 // r0, but JumpToBuiltin expects r0 to contain the number of
50 // arguments including the receiver.
51 __ add(r0, r0, Operand(1));
52 } else {
53 // The number passed in argc excludes the receiver, but
54 // JumpToBuiltin expects r0 to contain the number of arguments
55 // including the receiver.
56 __ mov(r0, Operand(argc + 1));
57 }
49 __ JumpToBuiltin(ExternalReference(id)); 58 __ JumpToBuiltin(ExternalReference(id));
50 } 59 }
51 60
52 61
53 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) { 62 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
54 // ----------- S t a t e ------------- 63 // ----------- S t a t e -------------
55 // -- r0 : number of arguments 64 // -- r0 : number of arguments
56 // -- r1 : constructor function 65 // -- r1 : constructor function
57 // -- lr : return address 66 // -- lr : return address
58 // -- sp[...]: constructor arguments 67 // -- sp[...]: constructor arguments
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 } 837 }
829 838
830 void Builtins::Generate_StubNoRegisters_DebugBreak(MacroAssembler* masm) { 839 void Builtins::Generate_StubNoRegisters_DebugBreak(MacroAssembler* masm) {
831 // Generate nothing as CodeStub CallFunction is not used on ARM. 840 // Generate nothing as CodeStub CallFunction is not used on ARM.
832 } 841 }
833 842
834 843
835 #undef __ 844 #undef __
836 845
837 } } // namespace v8::internal 846 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698