| 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 } | 908 } |
| 909 | 909 |
| 910 GenerateFastApiDirectCall(masm, optimization, argc, true); | 910 GenerateFastApiDirectCall(masm, optimization, argc, true); |
| 911 } | 911 } |
| 912 | 912 |
| 913 | 913 |
| 914 class CallInterceptorCompiler BASE_EMBEDDED { | 914 class CallInterceptorCompiler BASE_EMBEDDED { |
| 915 public: | 915 public: |
| 916 CallInterceptorCompiler(CallStubCompiler* stub_compiler, | 916 CallInterceptorCompiler(CallStubCompiler* stub_compiler, |
| 917 const ParameterCount& arguments, | 917 const ParameterCount& arguments, |
| 918 Register name, | 918 Register name) |
| 919 ExtraICState extra_ic_state) | |
| 920 : stub_compiler_(stub_compiler), | 919 : stub_compiler_(stub_compiler), |
| 921 arguments_(arguments), | 920 arguments_(arguments), |
| 922 name_(name), | 921 name_(name) {} |
| 923 extra_ic_state_(extra_ic_state) {} | |
| 924 | 922 |
| 925 void Compile(MacroAssembler* masm, | 923 void Compile(MacroAssembler* masm, |
| 926 Handle<JSObject> object, | 924 Handle<JSObject> object, |
| 927 Handle<JSObject> holder, | 925 Handle<JSObject> holder, |
| 928 Handle<Name> name, | 926 Handle<Name> name, |
| 929 LookupResult* lookup, | 927 LookupResult* lookup, |
| 930 Register receiver, | 928 Register receiver, |
| 931 Register scratch1, | 929 Register scratch1, |
| 932 Register scratch2, | 930 Register scratch2, |
| 933 Register scratch3, | 931 Register scratch3, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 __ pop(receiver); // Restore the holder. | 1086 __ pop(receiver); // Restore the holder. |
| 1089 } | 1087 } |
| 1090 // If interceptor returns no-result sentinel, call the constant function. | 1088 // If interceptor returns no-result sentinel, call the constant function. |
| 1091 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); | 1089 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); |
| 1092 __ Branch(interceptor_succeeded, ne, v0, Operand(scratch)); | 1090 __ Branch(interceptor_succeeded, ne, v0, Operand(scratch)); |
| 1093 } | 1091 } |
| 1094 | 1092 |
| 1095 CallStubCompiler* stub_compiler_; | 1093 CallStubCompiler* stub_compiler_; |
| 1096 const ParameterCount& arguments_; | 1094 const ParameterCount& arguments_; |
| 1097 Register name_; | 1095 Register name_; |
| 1098 ExtraICState extra_ic_state_; | |
| 1099 }; | 1096 }; |
| 1100 | 1097 |
| 1101 | 1098 |
| 1102 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { | 1099 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { |
| 1103 __ Jump(code, RelocInfo::CODE_TARGET); | 1100 __ Jump(code, RelocInfo::CODE_TARGET); |
| 1104 } | 1101 } |
| 1105 | 1102 |
| 1106 | 1103 |
| 1107 #undef __ | 1104 #undef __ |
| 1108 #define __ ACCESS_MASM(masm()) | 1105 #define __ ACCESS_MASM(masm()) |
| (...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2456 GenerateNameCheck(name, &miss); | 2453 GenerateNameCheck(name, &miss); |
| 2457 | 2454 |
| 2458 // Get the number of arguments. | 2455 // Get the number of arguments. |
| 2459 const int argc = arguments().immediate(); | 2456 const int argc = arguments().immediate(); |
| 2460 LookupResult lookup(isolate()); | 2457 LookupResult lookup(isolate()); |
| 2461 LookupPostInterceptor(holder, name, &lookup); | 2458 LookupPostInterceptor(holder, name, &lookup); |
| 2462 | 2459 |
| 2463 // Get the receiver from the stack. | 2460 // Get the receiver from the stack. |
| 2464 __ lw(a1, MemOperand(sp, argc * kPointerSize)); | 2461 __ lw(a1, MemOperand(sp, argc * kPointerSize)); |
| 2465 | 2462 |
| 2466 CallInterceptorCompiler compiler(this, arguments(), a2, extra_state()); | 2463 CallInterceptorCompiler compiler(this, arguments(), a2); |
| 2467 compiler.Compile(masm(), object, holder, name, &lookup, a1, a3, t0, a0, | 2464 compiler.Compile(masm(), object, holder, name, &lookup, a1, a3, t0, a0, |
| 2468 &miss); | 2465 &miss); |
| 2469 | 2466 |
| 2470 // Move returned value, the function to call, to a1. | 2467 // Move returned value, the function to call, to a1. |
| 2471 __ mov(a1, v0); | 2468 __ mov(a1, v0); |
| 2472 // Restore receiver. | 2469 // Restore receiver. |
| 2473 __ lw(a0, MemOperand(sp, argc * kPointerSize)); | 2470 __ lw(a0, MemOperand(sp, argc * kPointerSize)); |
| 2474 | 2471 |
| 2475 GenerateJumpFunction(object, a1, &miss); | 2472 GenerateJumpFunction(object, a1, &miss); |
| 2476 | 2473 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2885 // ----------------------------------- | 2882 // ----------------------------------- |
| 2886 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2883 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 2887 } | 2884 } |
| 2888 | 2885 |
| 2889 | 2886 |
| 2890 #undef __ | 2887 #undef __ |
| 2891 | 2888 |
| 2892 } } // namespace v8::internal | 2889 } } // namespace v8::internal |
| 2893 | 2890 |
| 2894 #endif // V8_TARGET_ARCH_MIPS | 2891 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |