OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3060 | 3060 |
3061 void ApiGetterEntryStub::Generate(MacroAssembler* masm) { | 3061 void ApiGetterEntryStub::Generate(MacroAssembler* masm) { |
3062 __ PrepareCallApiFunction(kStackSpace, kArgc); | 3062 __ PrepareCallApiFunction(kStackSpace, kArgc); |
3063 STATIC_ASSERT(kArgc == 2); | 3063 STATIC_ASSERT(kArgc == 2); |
3064 __ mov(ApiParameterOperand(0), ebx); // name. | 3064 __ mov(ApiParameterOperand(0), ebx); // name. |
3065 __ mov(ApiParameterOperand(1), eax); // arguments pointer. | 3065 __ mov(ApiParameterOperand(1), eax); // arguments pointer. |
3066 __ CallApiFunctionAndReturn(fun(), kArgc); | 3066 __ CallApiFunctionAndReturn(fun(), kArgc); |
3067 } | 3067 } |
3068 | 3068 |
3069 | 3069 |
| 3070 void ApiCallEntryStub::Generate(MacroAssembler* masm) { |
| 3071 __ PrepareCallApiFunction(kStackSpace, kArgc); |
| 3072 STATIC_ASSERT(kArgc == 5); |
| 3073 |
| 3074 // Allocate the v8::Arguments structure in the arguments' space since |
| 3075 // it's not controlled by GC. |
| 3076 __ mov(ApiParameterOperand(1), eax); // v8::Arguments::implicit_args_. |
| 3077 __ mov(ApiParameterOperand(2), ebx); // v8::Arguments::values_. |
| 3078 __ mov(ApiParameterOperand(3), edx); // v8::Arguments::length_. |
| 3079 // v8::Arguments::is_construct_call_. |
| 3080 __ mov(ApiParameterOperand(4), Immediate(0)); |
| 3081 |
| 3082 // v8::InvocationCallback's argument. |
| 3083 __ lea(eax, ApiParameterOperand(1)); |
| 3084 __ mov(ApiParameterOperand(0), eax); |
| 3085 |
| 3086 __ CallApiFunctionAndReturn(fun(), kArgc); |
| 3087 } |
| 3088 |
| 3089 |
3070 void CEntryStub::GenerateCore(MacroAssembler* masm, | 3090 void CEntryStub::GenerateCore(MacroAssembler* masm, |
3071 Label* throw_normal_exception, | 3091 Label* throw_normal_exception, |
3072 Label* throw_termination_exception, | 3092 Label* throw_termination_exception, |
3073 Label* throw_out_of_memory_exception, | 3093 Label* throw_out_of_memory_exception, |
3074 bool do_gc, | 3094 bool do_gc, |
3075 bool always_allocate_scope, | 3095 bool always_allocate_scope, |
3076 int /* alignment_skew */) { | 3096 int /* alignment_skew */) { |
3077 // eax: result parameter for PerformGC, if any | 3097 // eax: result parameter for PerformGC, if any |
3078 // ebx: pointer to C function (C callee-saved) | 3098 // ebx: pointer to C function (C callee-saved) |
3079 // ebp: frame pointer (restored after C call) | 3099 // ebp: frame pointer (restored after C call) |
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4579 // tagged as a small integer. | 4599 // tagged as a small integer. |
4580 __ bind(&runtime); | 4600 __ bind(&runtime); |
4581 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 4601 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
4582 } | 4602 } |
4583 | 4603 |
4584 #undef __ | 4604 #undef __ |
4585 | 4605 |
4586 } } // namespace v8::internal | 4606 } } // namespace v8::internal |
4587 | 4607 |
4588 #endif // V8_TARGET_ARCH_IA32 | 4608 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |