| 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 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2255   GenerateGlobalReceiverCheck(object, holder, name, &miss); | 2255   GenerateGlobalReceiverCheck(object, holder, name, &miss); | 
| 2256 | 2256 | 
| 2257   GenerateLoadFunctionFromCell(cell, function, &miss); | 2257   GenerateLoadFunctionFromCell(cell, function, &miss); | 
| 2258 | 2258 | 
| 2259   // Patch the receiver on the stack with the global proxy. | 2259   // Patch the receiver on the stack with the global proxy. | 
| 2260   if (object->IsGlobalObject()) { | 2260   if (object->IsGlobalObject()) { | 
| 2261     __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset)); | 2261     __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset)); | 
| 2262     __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx); | 2262     __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx); | 
| 2263   } | 2263   } | 
| 2264 | 2264 | 
| 2265   // Setup the context (function already in edi). | 2265   // Setup the context (function already in rdi). | 
| 2266   __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); | 2266   __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); | 
| 2267 | 2267 | 
| 2268   // Jump to the cached code (tail call). | 2268   // Jump to the cached code (tail call). | 
| 2269   __ IncrementCounter(&Counters::call_global_inline, 1); | 2269   __ IncrementCounter(&Counters::call_global_inline, 1); | 
| 2270   ASSERT(function->is_compiled()); | 2270   ASSERT(function->is_compiled()); | 
| 2271   Handle<Code> code(function->code()); |  | 
| 2272   ParameterCount expected(function->shared()->formal_parameter_count()); | 2271   ParameterCount expected(function->shared()->formal_parameter_count()); | 
| 2273   __ InvokeCode(code, expected, arguments(), | 2272   if (V8::UseCrankshaft()) { | 
| 2274                 RelocInfo::CODE_TARGET, JUMP_FUNCTION); | 2273     // TODO(kasperl): For now, we always call indirectly through the | 
| 2275 | 2274     // code field in the function to allow recompilation to take effect | 
|  | 2275     // without changing any of the call sites. | 
|  | 2276     __ movq(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); | 
|  | 2277     __ InvokeCode(rdx, expected, arguments(), JUMP_FUNCTION); | 
|  | 2278   } else { | 
|  | 2279     Handle<Code> code(function->code()); | 
|  | 2280     __ InvokeCode(code, expected, arguments(), | 
|  | 2281 »       »         RelocInfo::CODE_TARGET, JUMP_FUNCTION); | 
|  | 2282   } | 
| 2276   // Handle call cache miss. | 2283   // Handle call cache miss. | 
| 2277   __ bind(&miss); | 2284   __ bind(&miss); | 
| 2278   __ IncrementCounter(&Counters::call_global_inline_miss, 1); | 2285   __ IncrementCounter(&Counters::call_global_inline_miss, 1); | 
| 2279   Object* obj; | 2286   Object* obj; | 
| 2280   { MaybeObject* maybe_obj = GenerateMissBranch(); | 2287   { MaybeObject* maybe_obj = GenerateMissBranch(); | 
| 2281     if (!maybe_obj->ToObject(&obj)) return maybe_obj; | 2288     if (!maybe_obj->ToObject(&obj)) return maybe_obj; | 
| 2282   } | 2289   } | 
| 2283 | 2290 | 
| 2284   // Return the generated code. | 2291   // Return the generated code. | 
| 2285   return GetCode(NORMAL, name); | 2292   return GetCode(NORMAL, name); | 
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3113   // Return the generated code. | 3120   // Return the generated code. | 
| 3114   return GetCode(); | 3121   return GetCode(); | 
| 3115 } | 3122 } | 
| 3116 | 3123 | 
| 3117 | 3124 | 
| 3118 #undef __ | 3125 #undef __ | 
| 3119 | 3126 | 
| 3120 } }  // namespace v8::internal | 3127 } }  // namespace v8::internal | 
| 3121 | 3128 | 
| 3122 #endif  // V8_TARGET_ARCH_X64 | 3129 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|