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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 const int kApiStackSpace = 4; | 500 const int kApiStackSpace = 4; |
501 | 501 |
502 __ PrepareCallApiFunction(argc + kFastApiCallArguments + 1, | 502 __ PrepareCallApiFunction(argc + kFastApiCallArguments + 1, |
503 kApiArgc + kApiStackSpace); | 503 kApiArgc + kApiStackSpace); |
504 | 504 |
505 __ mov(ApiParameterOperand(1), eax); // v8::Arguments::implicit_args_. | 505 __ mov(ApiParameterOperand(1), eax); // v8::Arguments::implicit_args_. |
506 __ add(Operand(eax), Immediate(argc * kPointerSize)); | 506 __ add(Operand(eax), Immediate(argc * kPointerSize)); |
507 __ mov(ApiParameterOperand(2), eax); // v8::Arguments::values_. | 507 __ mov(ApiParameterOperand(2), eax); // v8::Arguments::values_. |
508 __ Set(ApiParameterOperand(3), Immediate(argc)); // v8::Arguments::length_. | 508 __ Set(ApiParameterOperand(3), Immediate(argc)); // v8::Arguments::length_. |
509 // v8::Arguments::is_construct_call_. | 509 // v8::Arguments::is_construct_call_. |
510 __ mov(ApiParameterOperand(4), Immediate(0)); | 510 __ Set(ApiParameterOperand(4), Immediate(0)); |
511 | 511 |
512 // v8::InvocationCallback's argument. | 512 // v8::InvocationCallback's argument. |
513 __ lea(eax, ApiParameterOperand(1)); | 513 __ lea(eax, ApiParameterOperand(1)); |
514 __ mov(ApiParameterOperand(0), eax); | 514 __ mov(ApiParameterOperand(0), eax); |
515 | 515 |
516 // Emitting a stub call may try to allocate (if the code is not | 516 // Emitting a stub call may try to allocate (if the code is not |
517 // already generated). Do not allow the assembler to perform a | 517 // already generated). Do not allow the assembler to perform a |
518 // garbage collection but instead return the allocation failure | 518 // garbage collection but instead return the allocation failure |
519 // object. | 519 // object. |
520 MaybeObject* result = | 520 MaybeObject* result = |
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3147 // Return the generated code. | 3147 // Return the generated code. |
3148 return GetCode(); | 3148 return GetCode(); |
3149 } | 3149 } |
3150 | 3150 |
3151 | 3151 |
3152 #undef __ | 3152 #undef __ |
3153 | 3153 |
3154 } } // namespace v8::internal | 3154 } } // namespace v8::internal |
3155 | 3155 |
3156 #endif // V8_TARGET_ARCH_IA32 | 3156 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |