OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3108 | 3108 |
3109 int arg_count = args->length() - 2; // 2 ~ receiver and function. | 3109 int arg_count = args->length() - 2; // 2 ~ receiver and function. |
3110 for (int i = 0; i < arg_count + 1; ++i) { | 3110 for (int i = 0; i < arg_count + 1; ++i) { |
3111 VisitForStackValue(args->at(i)); | 3111 VisitForStackValue(args->at(i)); |
3112 } | 3112 } |
3113 VisitForAccumulatorValue(args->last()); // Function. | 3113 VisitForAccumulatorValue(args->last()); // Function. |
3114 | 3114 |
3115 // InvokeFunction requires the function in edi. Move it in there. | 3115 // InvokeFunction requires the function in edi. Move it in there. |
3116 __ mov(edi, result_register()); | 3116 __ mov(edi, result_register()); |
3117 ParameterCount count(arg_count); | 3117 ParameterCount count(arg_count); |
3118 __ InvokeFunction(edi, count, CALL_FUNCTION); | 3118 __ InvokeFunction(edi, count, CALL_FUNCTION, |
| 3119 NullCallWrapper(), CALL_AS_METHOD); |
3119 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3120 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
3120 context()->Plug(eax); | 3121 context()->Plug(eax); |
3121 } | 3122 } |
3122 | 3123 |
3123 | 3124 |
3124 void FullCodeGenerator::EmitRegExpConstructResult(ZoneList<Expression*>* args) { | 3125 void FullCodeGenerator::EmitRegExpConstructResult(ZoneList<Expression*>* args) { |
3125 // Load the arguments on the stack and call the stub. | 3126 // Load the arguments on the stack and call the stub. |
3126 RegExpConstructResultStub stub; | 3127 RegExpConstructResultStub stub; |
3127 ASSERT(args->length() == 3); | 3128 ASSERT(args->length() == 3); |
3128 VisitForStackValue(args->at(0)); | 3129 VisitForStackValue(args->at(0)); |
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4329 // And return. | 4330 // And return. |
4330 __ ret(0); | 4331 __ ret(0); |
4331 } | 4332 } |
4332 | 4333 |
4333 | 4334 |
4334 #undef __ | 4335 #undef __ |
4335 | 4336 |
4336 } } // namespace v8::internal | 4337 } } // namespace v8::internal |
4337 | 4338 |
4338 #endif // V8_TARGET_ARCH_IA32 | 4339 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |