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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 // NOTE: the O32 abi requires a0 to hold a special pointer when returning a | 1166 // NOTE: the O32 abi requires a0 to hold a special pointer when returning a |
1167 // struct from the function (which is currently the case). This means we pass | 1167 // struct from the function (which is currently the case). This means we pass |
1168 // the arguments in a1-a2 instead of a0-a1. TryCallApiFunctionAndReturn | 1168 // the arguments in a1-a2 instead of a0-a1. TryCallApiFunctionAndReturn |
1169 // will handle setting up a0. | 1169 // will handle setting up a0. |
1170 | 1170 |
1171 const int kApiStackSpace = 1; | 1171 const int kApiStackSpace = 1; |
1172 FrameScope frame_scope(masm(), StackFrame::MANUAL); | 1172 FrameScope frame_scope(masm(), StackFrame::MANUAL); |
1173 __ EnterExitFrame(false, kApiStackSpace); | 1173 __ EnterExitFrame(false, kApiStackSpace); |
1174 | 1174 |
1175 // Create AccessorInfo instance on the stack above the exit frame with | 1175 // Create AccessorInfo instance on the stack above the exit frame with |
1176 // scratch2 (internal::Object **args_) as the data. | 1176 // scratch2 (internal::Object** args_) as the data. |
1177 __ sw(a2, MemOperand(sp, kPointerSize)); | 1177 __ sw(a2, MemOperand(sp, kPointerSize)); |
1178 // a2 (second argument - see note above) = AccessorInfo& | 1178 // a2 (second argument - see note above) = AccessorInfo& |
1179 __ Addu(a2, sp, kPointerSize); | 1179 __ Addu(a2, sp, kPointerSize); |
1180 | 1180 |
1181 const int kStackUnwindSpace = 4; | 1181 const int kStackUnwindSpace = 4; |
1182 Address getter_address = v8::ToCData<Address>(callback->getter()); | 1182 Address getter_address = v8::ToCData<Address>(callback->getter()); |
1183 ApiFunction fun(getter_address); | 1183 ApiFunction fun(getter_address); |
1184 ExternalReference ref = | 1184 ExternalReference ref = |
1185 ExternalReference(&fun, | 1185 ExternalReference(&fun, |
1186 ExternalReference::DIRECT_GETTER_CALL, | 1186 ExternalReference::DIRECT_GETTER_CALL, |
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2423 GenerateGlobalReceiverCheck(object, holder, name, &miss); | 2423 GenerateGlobalReceiverCheck(object, holder, name, &miss); |
2424 GenerateLoadFunctionFromCell(cell, function, &miss); | 2424 GenerateLoadFunctionFromCell(cell, function, &miss); |
2425 | 2425 |
2426 // Patch the receiver on the stack with the global proxy if | 2426 // Patch the receiver on the stack with the global proxy if |
2427 // necessary. | 2427 // necessary. |
2428 if (object->IsGlobalObject()) { | 2428 if (object->IsGlobalObject()) { |
2429 __ lw(a3, FieldMemOperand(a0, GlobalObject::kGlobalReceiverOffset)); | 2429 __ lw(a3, FieldMemOperand(a0, GlobalObject::kGlobalReceiverOffset)); |
2430 __ sw(a3, MemOperand(sp, argc * kPointerSize)); | 2430 __ sw(a3, MemOperand(sp, argc * kPointerSize)); |
2431 } | 2431 } |
2432 | 2432 |
2433 // Setup the context (function already in r1). | 2433 // Set up the context (function already in r1). |
2434 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 2434 __ lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |
2435 | 2435 |
2436 // Jump to the cached code (tail call). | 2436 // Jump to the cached code (tail call). |
2437 Counters* counters = masm()->isolate()->counters(); | 2437 Counters* counters = masm()->isolate()->counters(); |
2438 __ IncrementCounter(counters->call_global_inline(), 1, a3, t0); | 2438 __ IncrementCounter(counters->call_global_inline(), 1, a3, t0); |
2439 ParameterCount expected(function->shared()->formal_parameter_count()); | 2439 ParameterCount expected(function->shared()->formal_parameter_count()); |
2440 CallKind call_kind = CallICBase::Contextual::decode(extra_state_) | 2440 CallKind call_kind = CallICBase::Contextual::decode(extra_state_) |
2441 ? CALL_AS_FUNCTION | 2441 ? CALL_AS_FUNCTION |
2442 : CALL_AS_METHOD; | 2442 : CALL_AS_METHOD; |
2443 // We call indirectly through the code field in the function to | 2443 // We call indirectly through the code field in the function to |
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4305 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 4305 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
4306 __ Jump(ic_miss, RelocInfo::CODE_TARGET); | 4306 __ Jump(ic_miss, RelocInfo::CODE_TARGET); |
4307 } | 4307 } |
4308 | 4308 |
4309 | 4309 |
4310 #undef __ | 4310 #undef __ |
4311 | 4311 |
4312 } } // namespace v8::internal | 4312 } } // namespace v8::internal |
4313 | 4313 |
4314 #endif // V8_TARGET_ARCH_MIPS | 4314 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |