OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 #define __ ACCESS_MASM(masm) | 36 #define __ ACCESS_MASM(masm) |
37 | 37 |
38 | 38 |
39 void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) { | 39 void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id) { |
40 // TODO(428): Don't pass the function in a static variable. | 40 // TODO(428): Don't pass the function in a static variable. |
41 ExternalReference passed = ExternalReference::builtin_passed_function(); | 41 ExternalReference passed = ExternalReference::builtin_passed_function(); |
42 __ mov(Operand::StaticVariable(passed), edi); | 42 __ mov(Operand::StaticVariable(passed), edi); |
43 | 43 |
44 // The actual argument count has already been loaded into register | 44 // The actual argument count has already been loaded into register |
45 // eax, but JumpToBuiltin expects eax to contain the number of | 45 // eax, but JumpToRuntime expects eax to contain the number of |
46 // arguments including the receiver. | 46 // arguments including the receiver. |
47 __ inc(eax); | 47 __ inc(eax); |
48 __ JumpToBuiltin(ExternalReference(id)); | 48 __ JumpToRuntime(ExternalReference(id)); |
49 } | 49 } |
50 | 50 |
51 | 51 |
52 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) { | 52 void Builtins::Generate_JSConstructCall(MacroAssembler* masm) { |
53 // ----------- S t a t e ------------- | 53 // ----------- S t a t e ------------- |
54 // -- eax: number of arguments | 54 // -- eax: number of arguments |
55 // -- edi: constructor function | 55 // -- edi: constructor function |
56 // ----------------------------------- | 56 // ----------------------------------- |
57 | 57 |
58 Label non_function_call; | 58 Label non_function_call; |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 // Dont adapt arguments. | 1229 // Dont adapt arguments. |
1230 // ------------------------------------------- | 1230 // ------------------------------------------- |
1231 __ bind(&dont_adapt_arguments); | 1231 __ bind(&dont_adapt_arguments); |
1232 __ jmp(Operand(edx)); | 1232 __ jmp(Operand(edx)); |
1233 } | 1233 } |
1234 | 1234 |
1235 | 1235 |
1236 #undef __ | 1236 #undef __ |
1237 | 1237 |
1238 } } // namespace v8::internal | 1238 } } // namespace v8::internal |
OLD | NEW |