| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2174 const int argc = arguments().immediate(); | 2174 const int argc = arguments().immediate(); |
| 2175 GenerateGlobalReceiverCheck(object, holder, name, &miss); | 2175 GenerateGlobalReceiverCheck(object, holder, name, &miss); |
| 2176 GenerateLoadFunctionFromCell(cell, function, &miss); | 2176 GenerateLoadFunctionFromCell(cell, function, &miss); |
| 2177 | 2177 |
| 2178 // Patch the receiver on the stack with the global proxy. | 2178 // Patch the receiver on the stack with the global proxy. |
| 2179 if (object->IsGlobalObject()) { | 2179 if (object->IsGlobalObject()) { |
| 2180 __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset)); | 2180 __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset)); |
| 2181 __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx); | 2181 __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx); |
| 2182 } | 2182 } |
| 2183 | 2183 |
| 2184 // Setup the context (function already in rdi). | 2184 // Set up the context (function already in rdi). |
| 2185 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); | 2185 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
| 2186 | 2186 |
| 2187 // Jump to the cached code (tail call). | 2187 // Jump to the cached code (tail call). |
| 2188 Counters* counters = isolate()->counters(); | 2188 Counters* counters = isolate()->counters(); |
| 2189 __ IncrementCounter(counters->call_global_inline(), 1); | 2189 __ IncrementCounter(counters->call_global_inline(), 1); |
| 2190 ParameterCount expected(function->shared()->formal_parameter_count()); | 2190 ParameterCount expected(function->shared()->formal_parameter_count()); |
| 2191 CallKind call_kind = CallICBase::Contextual::decode(extra_state_) | 2191 CallKind call_kind = CallICBase::Contextual::decode(extra_state_) |
| 2192 ? CALL_AS_FUNCTION | 2192 ? CALL_AS_FUNCTION |
| 2193 : CALL_AS_METHOD; | 2193 : CALL_AS_METHOD; |
| 2194 // We call indirectly through the code field in the function to | 2194 // We call indirectly through the code field in the function to |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3586 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 3586 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
| 3587 __ jmp(ic_miss, RelocInfo::CODE_TARGET); | 3587 __ jmp(ic_miss, RelocInfo::CODE_TARGET); |
| 3588 } | 3588 } |
| 3589 | 3589 |
| 3590 | 3590 |
| 3591 #undef __ | 3591 #undef __ |
| 3592 | 3592 |
| 3593 } } // namespace v8::internal | 3593 } } // namespace v8::internal |
| 3594 | 3594 |
| 3595 #endif // V8_TARGET_ARCH_X64 | 3595 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |