| 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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 GenerateFastApiCallBody(masm, | 853 GenerateFastApiCallBody(masm, |
| 854 optimization, | 854 optimization, |
| 855 argc, | 855 argc, |
| 856 receiver, | 856 receiver, |
| 857 true); | 857 true); |
| 858 } | 858 } |
| 859 | 859 |
| 860 | 860 |
| 861 class CallInterceptorCompiler BASE_EMBEDDED { | 861 class CallInterceptorCompiler BASE_EMBEDDED { |
| 862 public: | 862 public: |
| 863 CallInterceptorCompiler(CallStubCompiler* stub_compiler, | 863 CallInterceptorCompiler(CallStubCompiler* stub_compiler, Register name) |
| 864 const ParameterCount& arguments, | |
| 865 Register name) | |
| 866 : stub_compiler_(stub_compiler), | 864 : stub_compiler_(stub_compiler), |
| 867 arguments_(arguments), | |
| 868 name_(name) {} | 865 name_(name) {} |
| 869 | 866 |
| 870 void Compile(MacroAssembler* masm, | 867 void Compile(MacroAssembler* masm, |
| 871 Handle<JSObject> object, | 868 Handle<JSObject> object, |
| 872 Handle<JSObject> holder, | 869 Handle<JSObject> holder, |
| 873 Handle<Name> name, | 870 Handle<Name> name, |
| 874 LookupResult* lookup, | 871 LookupResult* lookup, |
| 875 Register receiver, | 872 Register receiver, |
| 876 Register scratch1, | 873 Register scratch1, |
| 877 Register scratch2, | 874 Register scratch2, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 __ pop(holder); | 987 __ pop(holder); |
| 991 __ pop(receiver); | 988 __ pop(receiver); |
| 992 } | 989 } |
| 993 // If interceptor returns no-result sentinel, call the constant function. | 990 // If interceptor returns no-result sentinel, call the constant function. |
| 994 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); | 991 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); |
| 995 __ cmp(r0, scratch); | 992 __ cmp(r0, scratch); |
| 996 __ b(ne, interceptor_succeeded); | 993 __ b(ne, interceptor_succeeded); |
| 997 } | 994 } |
| 998 | 995 |
| 999 CallStubCompiler* stub_compiler_; | 996 CallStubCompiler* stub_compiler_; |
| 1000 const ParameterCount& arguments_; | |
| 1001 Register name_; | 997 Register name_; |
| 1002 }; | 998 }; |
| 1003 | 999 |
| 1004 | 1000 |
| 1005 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { | 1001 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { |
| 1006 __ Jump(code, RelocInfo::CODE_TARGET); | 1002 __ Jump(code, RelocInfo::CODE_TARGET); |
| 1007 } | 1003 } |
| 1008 | 1004 |
| 1009 | 1005 |
| 1010 #undef __ | 1006 #undef __ |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 GenerateNameCheck(name, &miss); | 1559 GenerateNameCheck(name, &miss); |
| 1564 | 1560 |
| 1565 // Get the number of arguments. | 1561 // Get the number of arguments. |
| 1566 const int argc = arguments().immediate(); | 1562 const int argc = arguments().immediate(); |
| 1567 LookupResult lookup(isolate()); | 1563 LookupResult lookup(isolate()); |
| 1568 LookupPostInterceptor(holder, name, &lookup); | 1564 LookupPostInterceptor(holder, name, &lookup); |
| 1569 | 1565 |
| 1570 // Get the receiver from the stack. | 1566 // Get the receiver from the stack. |
| 1571 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); | 1567 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); |
| 1572 | 1568 |
| 1573 CallInterceptorCompiler compiler(this, arguments(), r2); | 1569 CallInterceptorCompiler compiler(this, r2); |
| 1574 compiler.Compile(masm(), object, holder, name, &lookup, r1, r3, r4, r0, | 1570 compiler.Compile(masm(), object, holder, name, &lookup, r1, r3, r4, r0, |
| 1575 &miss); | 1571 &miss); |
| 1576 | 1572 |
| 1577 // Move returned value, the function to call, to r1. | 1573 // Move returned value, the function to call, to r1. |
| 1578 __ mov(r1, r0); | 1574 __ mov(r1, r0); |
| 1579 // Restore receiver. | 1575 // Restore receiver. |
| 1580 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); | 1576 __ ldr(r0, MemOperand(sp, argc * kPointerSize)); |
| 1581 | 1577 |
| 1582 GenerateJumpFunction(object, r1, &miss); | 1578 GenerateJumpFunction(object, r1, &miss); |
| 1583 | 1579 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 // ----------------------------------- | 1970 // ----------------------------------- |
| 1975 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1971 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1976 } | 1972 } |
| 1977 | 1973 |
| 1978 | 1974 |
| 1979 #undef __ | 1975 #undef __ |
| 1980 | 1976 |
| 1981 } } // namespace v8::internal | 1977 } } // namespace v8::internal |
| 1982 | 1978 |
| 1983 #endif // V8_TARGET_ARCH_ARM | 1979 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |