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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Insert extra arguments. | 55 // Insert extra arguments. |
56 int num_extra_args = 0; | 56 int num_extra_args = 0; |
57 if (extra_args == NEEDS_CALLED_FUNCTION) { | 57 if (extra_args == NEEDS_CALLED_FUNCTION) { |
58 num_extra_args = 1; | 58 num_extra_args = 1; |
59 __ push(r1); | 59 __ push(r1); |
60 } else { | 60 } else { |
61 ASSERT(extra_args == NO_EXTRA_ARGUMENTS); | 61 ASSERT(extra_args == NO_EXTRA_ARGUMENTS); |
62 } | 62 } |
63 | 63 |
64 // JumpToRuntime expects r0 to contain the number of arguments | 64 // JumpToExternalReference expects r0 to contain the number of arguments |
65 // including the receiver and the extra arguments. | 65 // including the receiver and the extra arguments. |
66 __ add(r0, r0, Operand(num_extra_args + 1)); | 66 __ add(r0, r0, Operand(num_extra_args + 1)); |
67 __ JumpToRuntime(ExternalReference(id)); | 67 __ JumpToExternalReference(ExternalReference(id)); |
68 } | 68 } |
69 | 69 |
70 | 70 |
71 // Load the built-in Array function from the current context. | 71 // Load the built-in Array function from the current context. |
72 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { | 72 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { |
73 // Load the global context. | 73 // Load the global context. |
74 | 74 |
75 __ ldr(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); | 75 __ ldr(result, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
76 __ ldr(result, | 76 __ ldr(result, |
77 FieldMemOperand(result, GlobalObject::kGlobalContextOffset)); | 77 FieldMemOperand(result, GlobalObject::kGlobalContextOffset)); |
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 // Dont adapt arguments. | 1302 // Dont adapt arguments. |
1303 // ------------------------------------------- | 1303 // ------------------------------------------- |
1304 __ bind(&dont_adapt_arguments); | 1304 __ bind(&dont_adapt_arguments); |
1305 __ Jump(r3); | 1305 __ Jump(r3); |
1306 } | 1306 } |
1307 | 1307 |
1308 | 1308 |
1309 #undef __ | 1309 #undef __ |
1310 | 1310 |
1311 } } // namespace v8::internal | 1311 } } // namespace v8::internal |
OLD | NEW |