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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 // object. | 481 // object. |
482 return masm->TryCallApiFunctionAndReturn(&fun, | 482 return masm->TryCallApiFunctionAndReturn(&fun, |
483 argc + kFastApiCallArguments + 1); | 483 argc + kFastApiCallArguments + 1); |
484 } | 484 } |
485 | 485 |
486 | 486 |
487 class CallInterceptorCompiler BASE_EMBEDDED { | 487 class CallInterceptorCompiler BASE_EMBEDDED { |
488 public: | 488 public: |
489 CallInterceptorCompiler(StubCompiler* stub_compiler, | 489 CallInterceptorCompiler(StubCompiler* stub_compiler, |
490 const ParameterCount& arguments, | 490 const ParameterCount& arguments, |
491 Register name) | 491 Register name, |
| 492 Code::ExtraICState extra_ic_state) |
492 : stub_compiler_(stub_compiler), | 493 : stub_compiler_(stub_compiler), |
493 arguments_(arguments), | 494 arguments_(arguments), |
494 name_(name) {} | 495 name_(name), |
| 496 extra_ic_state_(extra_ic_state) {} |
495 | 497 |
496 MaybeObject* Compile(MacroAssembler* masm, | 498 MaybeObject* Compile(MacroAssembler* masm, |
497 JSObject* object, | 499 JSObject* object, |
498 JSObject* holder, | 500 JSObject* holder, |
499 String* name, | 501 String* name, |
500 LookupResult* lookup, | 502 LookupResult* lookup, |
501 Register receiver, | 503 Register receiver, |
502 Register scratch1, | 504 Register scratch1, |
503 Register scratch2, | 505 Register scratch2, |
504 Register scratch3, | 506 Register scratch3, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 // by the previous CheckPrototypes. | 611 // by the previous CheckPrototypes. |
610 ASSERT(depth2 == kInvalidProtoDepth); | 612 ASSERT(depth2 == kInvalidProtoDepth); |
611 } | 613 } |
612 | 614 |
613 // Invoke function. | 615 // Invoke function. |
614 if (can_do_fast_api_call) { | 616 if (can_do_fast_api_call) { |
615 MaybeObject* result = | 617 MaybeObject* result = |
616 GenerateFastApiCall(masm, optimization, arguments_.immediate()); | 618 GenerateFastApiCall(masm, optimization, arguments_.immediate()); |
617 if (result->IsFailure()) return result; | 619 if (result->IsFailure()) return result; |
618 } else { | 620 } else { |
| 621 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
| 622 ? CALL_AS_FUNCTION |
| 623 : CALL_AS_METHOD; |
619 __ InvokeFunction(optimization.constant_function(), arguments_, | 624 __ InvokeFunction(optimization.constant_function(), arguments_, |
620 JUMP_FUNCTION); | 625 JUMP_FUNCTION, NullCallWrapper(), call_kind); |
621 } | 626 } |
622 | 627 |
623 // Deferred code for fast API call case---clean preallocated space. | 628 // Deferred code for fast API call case---clean preallocated space. |
624 if (can_do_fast_api_call) { | 629 if (can_do_fast_api_call) { |
625 __ bind(&miss_cleanup); | 630 __ bind(&miss_cleanup); |
626 FreeSpaceForFastApiCall(masm, scratch1); | 631 FreeSpaceForFastApiCall(masm, scratch1); |
627 __ jmp(miss_label); | 632 __ jmp(miss_label); |
628 } | 633 } |
629 | 634 |
630 // Invoke a regular function. | 635 // Invoke a regular function. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 __ pop(receiver); // Restore the holder. | 694 __ pop(receiver); // Restore the holder. |
690 __ LeaveInternalFrame(); | 695 __ LeaveInternalFrame(); |
691 | 696 |
692 __ cmp(eax, masm->isolate()->factory()->no_interceptor_result_sentinel()); | 697 __ cmp(eax, masm->isolate()->factory()->no_interceptor_result_sentinel()); |
693 __ j(not_equal, interceptor_succeeded); | 698 __ j(not_equal, interceptor_succeeded); |
694 } | 699 } |
695 | 700 |
696 StubCompiler* stub_compiler_; | 701 StubCompiler* stub_compiler_; |
697 const ParameterCount& arguments_; | 702 const ParameterCount& arguments_; |
698 Register name_; | 703 Register name_; |
| 704 Code::ExtraICState extra_ic_state_; |
699 }; | 705 }; |
700 | 706 |
701 | 707 |
702 void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) { | 708 void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) { |
703 ASSERT(kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC); | 709 ASSERT(kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC); |
704 Code* code = NULL; | 710 Code* code = NULL; |
705 if (kind == Code::LOAD_IC) { | 711 if (kind == Code::LOAD_IC) { |
706 code = masm->isolate()->builtins()->builtin(Builtins::kLoadIC_Miss); | 712 code = masm->isolate()->builtins()->builtin(Builtins::kLoadIC_Miss); |
707 } else { | 713 } else { |
708 code = masm->isolate()->builtins()->builtin(Builtins::kKeyedLoadIC_Miss); | 714 code = masm->isolate()->builtins()->builtin(Builtins::kKeyedLoadIC_Miss); |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 __ j(not_equal, &miss); | 1382 __ j(not_equal, &miss); |
1377 | 1383 |
1378 // Patch the receiver on the stack with the global proxy if | 1384 // Patch the receiver on the stack with the global proxy if |
1379 // necessary. | 1385 // necessary. |
1380 if (object->IsGlobalObject()) { | 1386 if (object->IsGlobalObject()) { |
1381 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); | 1387 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); |
1382 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); | 1388 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); |
1383 } | 1389 } |
1384 | 1390 |
1385 // Invoke the function. | 1391 // Invoke the function. |
1386 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION); | 1392 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
| 1393 ? CALL_AS_FUNCTION |
| 1394 : CALL_AS_METHOD; |
| 1395 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, |
| 1396 NullCallWrapper(), call_kind); |
1387 | 1397 |
1388 // Handle call cache miss. | 1398 // Handle call cache miss. |
1389 __ bind(&miss); | 1399 __ bind(&miss); |
1390 MaybeObject* maybe_result = GenerateMissBranch(); | 1400 MaybeObject* maybe_result = GenerateMissBranch(); |
1391 if (maybe_result->IsFailure()) return maybe_result; | 1401 if (maybe_result->IsFailure()) return maybe_result; |
1392 | 1402 |
1393 // Return the generated code. | 1403 // Return the generated code. |
1394 return GetCode(FIELD, name); | 1404 return GetCode(FIELD, name); |
1395 } | 1405 } |
1396 | 1406 |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 StringCharFromCodeGenerator char_from_code_generator(code, eax); | 1872 StringCharFromCodeGenerator char_from_code_generator(code, eax); |
1863 char_from_code_generator.GenerateFast(masm()); | 1873 char_from_code_generator.GenerateFast(masm()); |
1864 __ ret(2 * kPointerSize); | 1874 __ ret(2 * kPointerSize); |
1865 | 1875 |
1866 StubRuntimeCallHelper call_helper; | 1876 StubRuntimeCallHelper call_helper; |
1867 char_from_code_generator.GenerateSlow(masm(), call_helper); | 1877 char_from_code_generator.GenerateSlow(masm(), call_helper); |
1868 | 1878 |
1869 // Tail call the full function. We do not have to patch the receiver | 1879 // Tail call the full function. We do not have to patch the receiver |
1870 // because the function makes no use of it. | 1880 // because the function makes no use of it. |
1871 __ bind(&slow); | 1881 __ bind(&slow); |
1872 __ InvokeFunction(function, arguments(), JUMP_FUNCTION); | 1882 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
| 1883 ? CALL_AS_FUNCTION |
| 1884 : CALL_AS_METHOD; |
| 1885 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, |
| 1886 NullCallWrapper(), call_kind); |
1873 | 1887 |
1874 __ bind(&miss); | 1888 __ bind(&miss); |
1875 // ecx: function name. | 1889 // ecx: function name. |
1876 MaybeObject* maybe_result = GenerateMissBranch(); | 1890 MaybeObject* maybe_result = GenerateMissBranch(); |
1877 if (maybe_result->IsFailure()) return maybe_result; | 1891 if (maybe_result->IsFailure()) return maybe_result; |
1878 | 1892 |
1879 // Return the generated code. | 1893 // Return the generated code. |
1880 return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); | 1894 return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); |
1881 } | 1895 } |
1882 | 1896 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1992 __ ret(2 * kPointerSize); | 2006 __ ret(2 * kPointerSize); |
1993 | 2007 |
1994 // Return the argument (when it's an already round heap number). | 2008 // Return the argument (when it's an already round heap number). |
1995 __ bind(&already_round); | 2009 __ bind(&already_round); |
1996 __ mov(eax, Operand(esp, 1 * kPointerSize)); | 2010 __ mov(eax, Operand(esp, 1 * kPointerSize)); |
1997 __ ret(2 * kPointerSize); | 2011 __ ret(2 * kPointerSize); |
1998 | 2012 |
1999 // Tail call the full function. We do not have to patch the receiver | 2013 // Tail call the full function. We do not have to patch the receiver |
2000 // because the function makes no use of it. | 2014 // because the function makes no use of it. |
2001 __ bind(&slow); | 2015 __ bind(&slow); |
2002 __ InvokeFunction(function, arguments(), JUMP_FUNCTION); | 2016 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, |
| 2017 NullCallWrapper(), CALL_AS_METHOD); |
2003 | 2018 |
2004 __ bind(&miss); | 2019 __ bind(&miss); |
2005 // ecx: function name. | 2020 // ecx: function name. |
2006 MaybeObject* maybe_result = GenerateMissBranch(); | 2021 MaybeObject* maybe_result = GenerateMissBranch(); |
2007 if (maybe_result->IsFailure()) return maybe_result; | 2022 if (maybe_result->IsFailure()) return maybe_result; |
2008 | 2023 |
2009 // Return the generated code. | 2024 // Return the generated code. |
2010 return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); | 2025 return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); |
2011 } | 2026 } |
2012 | 2027 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2097 __ and_(ebx, ~HeapNumber::kSignMask); | 2112 __ and_(ebx, ~HeapNumber::kSignMask); |
2098 __ mov(ecx, FieldOperand(eax, HeapNumber::kMantissaOffset)); | 2113 __ mov(ecx, FieldOperand(eax, HeapNumber::kMantissaOffset)); |
2099 __ AllocateHeapNumber(eax, edi, edx, &slow); | 2114 __ AllocateHeapNumber(eax, edi, edx, &slow); |
2100 __ mov(FieldOperand(eax, HeapNumber::kExponentOffset), ebx); | 2115 __ mov(FieldOperand(eax, HeapNumber::kExponentOffset), ebx); |
2101 __ mov(FieldOperand(eax, HeapNumber::kMantissaOffset), ecx); | 2116 __ mov(FieldOperand(eax, HeapNumber::kMantissaOffset), ecx); |
2102 __ ret(2 * kPointerSize); | 2117 __ ret(2 * kPointerSize); |
2103 | 2118 |
2104 // Tail call the full function. We do not have to patch the receiver | 2119 // Tail call the full function. We do not have to patch the receiver |
2105 // because the function makes no use of it. | 2120 // because the function makes no use of it. |
2106 __ bind(&slow); | 2121 __ bind(&slow); |
2107 __ InvokeFunction(function, arguments(), JUMP_FUNCTION); | 2122 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, |
| 2123 NullCallWrapper(), CALL_AS_METHOD); |
2108 | 2124 |
2109 __ bind(&miss); | 2125 __ bind(&miss); |
2110 // ecx: function name. | 2126 // ecx: function name. |
2111 MaybeObject* maybe_result = GenerateMissBranch(); | 2127 MaybeObject* maybe_result = GenerateMissBranch(); |
2112 if (maybe_result->IsFailure()) return maybe_result; | 2128 if (maybe_result->IsFailure()) return maybe_result; |
2113 | 2129 |
2114 // Return the generated code. | 2130 // Return the generated code. |
2115 return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); | 2131 return (cell == NULL) ? GetCode(function) : GetCode(NORMAL, name); |
2116 } | 2132 } |
2117 | 2133 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2171 | 2187 |
2172 __ bind(&miss_before_stack_reserved); | 2188 __ bind(&miss_before_stack_reserved); |
2173 MaybeObject* maybe_result = GenerateMissBranch(); | 2189 MaybeObject* maybe_result = GenerateMissBranch(); |
2174 if (maybe_result->IsFailure()) return maybe_result; | 2190 if (maybe_result->IsFailure()) return maybe_result; |
2175 | 2191 |
2176 // Return the generated code. | 2192 // Return the generated code. |
2177 return GetCode(function); | 2193 return GetCode(function); |
2178 } | 2194 } |
2179 | 2195 |
2180 | 2196 |
2181 MaybeObject* CallStubCompiler::CompileCallConstant(Object* object, | 2197 MaybeObject* CallStubCompiler::CompileCallConstant( |
2182 JSObject* holder, | 2198 Object* object, |
2183 JSFunction* function, | 2199 JSObject* holder, |
2184 String* name, | 2200 JSFunction* function, |
2185 CheckType check) { | 2201 String* name, |
| 2202 CheckType check) { |
2186 // ----------- S t a t e ------------- | 2203 // ----------- S t a t e ------------- |
2187 // -- ecx : name | 2204 // -- ecx : name |
2188 // -- esp[0] : return address | 2205 // -- esp[0] : return address |
2189 // -- esp[(argc - n) * 4] : arg[n] (zero-based) | 2206 // -- esp[(argc - n) * 4] : arg[n] (zero-based) |
2190 // -- ... | 2207 // -- ... |
2191 // -- esp[(argc + 1) * 4] : receiver | 2208 // -- esp[(argc + 1) * 4] : receiver |
2192 // ----------------------------------- | 2209 // ----------------------------------- |
2193 | 2210 |
2194 if (HasCustomCallGenerator(function)) { | 2211 if (HasCustomCallGenerator(function)) { |
2195 MaybeObject* maybe_result = CompileCustomCall( | 2212 MaybeObject* maybe_result = CompileCustomCall( |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 CheckPrototypes(JSObject::cast(object->GetPrototype()), eax, holder, | 2310 CheckPrototypes(JSObject::cast(object->GetPrototype()), eax, holder, |
2294 ebx, edx, edi, name, &miss); | 2311 ebx, edx, edi, name, &miss); |
2295 } | 2312 } |
2296 break; | 2313 break; |
2297 } | 2314 } |
2298 | 2315 |
2299 default: | 2316 default: |
2300 UNREACHABLE(); | 2317 UNREACHABLE(); |
2301 } | 2318 } |
2302 | 2319 |
2303 __ InvokeFunction(function, arguments(), JUMP_FUNCTION); | 2320 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
| 2321 ? CALL_AS_FUNCTION |
| 2322 : CALL_AS_METHOD; |
| 2323 __ InvokeFunction(function, arguments(), JUMP_FUNCTION, |
| 2324 NullCallWrapper(), call_kind); |
2304 | 2325 |
2305 // Handle call cache miss. | 2326 // Handle call cache miss. |
2306 __ bind(&miss); | 2327 __ bind(&miss); |
2307 MaybeObject* maybe_result = GenerateMissBranch(); | 2328 MaybeObject* maybe_result = GenerateMissBranch(); |
2308 if (maybe_result->IsFailure()) return maybe_result; | 2329 if (maybe_result->IsFailure()) return maybe_result; |
2309 | 2330 |
2310 // Return the generated code. | 2331 // Return the generated code. |
2311 return GetCode(function); | 2332 return GetCode(function); |
2312 } | 2333 } |
2313 | 2334 |
(...skipping 14 matching lines...) Expand all Loading... |
2328 | 2349 |
2329 // Get the number of arguments. | 2350 // Get the number of arguments. |
2330 const int argc = arguments().immediate(); | 2351 const int argc = arguments().immediate(); |
2331 | 2352 |
2332 LookupResult lookup; | 2353 LookupResult lookup; |
2333 LookupPostInterceptor(holder, name, &lookup); | 2354 LookupPostInterceptor(holder, name, &lookup); |
2334 | 2355 |
2335 // Get the receiver from the stack. | 2356 // Get the receiver from the stack. |
2336 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); | 2357 __ mov(edx, Operand(esp, (argc + 1) * kPointerSize)); |
2337 | 2358 |
2338 CallInterceptorCompiler compiler(this, arguments(), ecx); | 2359 CallInterceptorCompiler compiler(this, arguments(), ecx, extra_ic_state_); |
2339 MaybeObject* result = compiler.Compile(masm(), | 2360 MaybeObject* result = compiler.Compile(masm(), |
2340 object, | 2361 object, |
2341 holder, | 2362 holder, |
2342 name, | 2363 name, |
2343 &lookup, | 2364 &lookup, |
2344 edx, | 2365 edx, |
2345 ebx, | 2366 ebx, |
2346 edi, | 2367 edi, |
2347 eax, | 2368 eax, |
2348 &miss); | 2369 &miss); |
(...skipping 10 matching lines...) Expand all Loading... |
2359 | 2380 |
2360 // Patch the receiver on the stack with the global proxy if | 2381 // Patch the receiver on the stack with the global proxy if |
2361 // necessary. | 2382 // necessary. |
2362 if (object->IsGlobalObject()) { | 2383 if (object->IsGlobalObject()) { |
2363 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); | 2384 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); |
2364 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); | 2385 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); |
2365 } | 2386 } |
2366 | 2387 |
2367 // Invoke the function. | 2388 // Invoke the function. |
2368 __ mov(edi, eax); | 2389 __ mov(edi, eax); |
2369 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION); | 2390 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
| 2391 ? CALL_AS_FUNCTION |
| 2392 : CALL_AS_METHOD; |
| 2393 __ InvokeFunction(edi, arguments(), JUMP_FUNCTION, |
| 2394 NullCallWrapper(), call_kind); |
2370 | 2395 |
2371 // Handle load cache miss. | 2396 // Handle load cache miss. |
2372 __ bind(&miss); | 2397 __ bind(&miss); |
2373 MaybeObject* maybe_result = GenerateMissBranch(); | 2398 MaybeObject* maybe_result = GenerateMissBranch(); |
2374 if (maybe_result->IsFailure()) return maybe_result; | 2399 if (maybe_result->IsFailure()) return maybe_result; |
2375 | 2400 |
2376 // Return the generated code. | 2401 // Return the generated code. |
2377 return GetCode(INTERCEPTOR, name); | 2402 return GetCode(INTERCEPTOR, name); |
2378 } | 2403 } |
2379 | 2404 |
2380 | 2405 |
2381 MaybeObject* CallStubCompiler::CompileCallGlobal( | 2406 MaybeObject* CallStubCompiler::CompileCallGlobal( |
2382 JSObject* object, | 2407 JSObject* object, |
2383 GlobalObject* holder, | 2408 GlobalObject* holder, |
2384 JSGlobalPropertyCell* cell, | 2409 JSGlobalPropertyCell* cell, |
2385 JSFunction* function, | 2410 JSFunction* function, |
2386 String* name, | 2411 String* name) { |
2387 Code::ExtraICState extra_ic_state) { | |
2388 // ----------- S t a t e ------------- | 2412 // ----------- S t a t e ------------- |
2389 // -- ecx : name | 2413 // -- ecx : name |
2390 // -- esp[0] : return address | 2414 // -- esp[0] : return address |
2391 // -- esp[(argc - n) * 4] : arg[n] (zero-based) | 2415 // -- esp[(argc - n) * 4] : arg[n] (zero-based) |
2392 // -- ... | 2416 // -- ... |
2393 // -- esp[(argc + 1) * 4] : receiver | 2417 // -- esp[(argc + 1) * 4] : receiver |
2394 // ----------------------------------- | 2418 // ----------------------------------- |
2395 | 2419 |
2396 if (HasCustomCallGenerator(function)) { | 2420 if (HasCustomCallGenerator(function)) { |
2397 MaybeObject* maybe_result = CompileCustomCall( | 2421 MaybeObject* maybe_result = CompileCustomCall( |
(...skipping 22 matching lines...) Expand all Loading... |
2420 } | 2444 } |
2421 | 2445 |
2422 // Setup the context (function already in edi). | 2446 // Setup the context (function already in edi). |
2423 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); | 2447 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); |
2424 | 2448 |
2425 // Jump to the cached code (tail call). | 2449 // Jump to the cached code (tail call). |
2426 Counters* counters = isolate()->counters(); | 2450 Counters* counters = isolate()->counters(); |
2427 __ IncrementCounter(counters->call_global_inline(), 1); | 2451 __ IncrementCounter(counters->call_global_inline(), 1); |
2428 ASSERT(function->is_compiled()); | 2452 ASSERT(function->is_compiled()); |
2429 ParameterCount expected(function->shared()->formal_parameter_count()); | 2453 ParameterCount expected(function->shared()->formal_parameter_count()); |
2430 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state) | 2454 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
2431 ? CALL_AS_FUNCTION | 2455 ? CALL_AS_FUNCTION |
2432 : CALL_AS_METHOD; | 2456 : CALL_AS_METHOD; |
2433 if (V8::UseCrankshaft()) { | 2457 if (V8::UseCrankshaft()) { |
2434 // TODO(kasperl): For now, we always call indirectly through the | 2458 // TODO(kasperl): For now, we always call indirectly through the |
2435 // code field in the function to allow recompilation to take effect | 2459 // code field in the function to allow recompilation to take effect |
2436 // without changing any of the call sites. | 2460 // without changing any of the call sites. |
2437 __ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), | 2461 __ InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), |
2438 expected, arguments(), JUMP_FUNCTION, | 2462 expected, arguments(), JUMP_FUNCTION, |
2439 NullCallWrapper(), call_kind); | 2463 NullCallWrapper(), call_kind); |
2440 } else { | 2464 } else { |
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3838 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3862 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
3839 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3863 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
3840 } | 3864 } |
3841 | 3865 |
3842 | 3866 |
3843 #undef __ | 3867 #undef __ |
3844 | 3868 |
3845 } } // namespace v8::internal | 3869 } } // namespace v8::internal |
3846 | 3870 |
3847 #endif // V8_TARGET_ARCH_IA32 | 3871 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |