Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 103453003: MIPS: Fix patching the receiver (global object -> global proxy) after the interceptor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, scratch2, 1000 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, scratch2,
1001 &regular_invoke); 1001 &regular_invoke);
1002 1002
1003 // Interceptor returned nothing for this property. Try to use cached 1003 // Interceptor returned nothing for this property. Try to use cached
1004 // constant function. 1004 // constant function.
1005 1005
1006 // Check that the maps from interceptor's holder to constant function's 1006 // Check that the maps from interceptor's holder to constant function's
1007 // holder haven't changed and thus we can use cached constant function. 1007 // holder haven't changed and thus we can use cached constant function.
1008 if (*interceptor_holder != lookup->holder()) { 1008 if (*interceptor_holder != lookup->holder()) {
1009 stub_compiler_->CheckPrototypes( 1009 stub_compiler_->CheckPrototypes(
1010 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver, 1010 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
1011 handle(lookup->holder()), scratch1, scratch2, scratch3, 1011 handle(lookup->holder()), scratch1, scratch2, scratch3,
1012 name, depth2, miss); 1012 name, depth2, miss);
1013 } else { 1013 } else {
1014 // CheckPrototypes has a side effect of fetching a 'holder' 1014 // CheckPrototypes has a side effect of fetching a 'holder'
1015 // for API (object which is instanceof for the signature). It's 1015 // for API (object which is instanceof for the signature). It's
1016 // safe to omit it here, as if present, it should be fetched 1016 // safe to omit it here, as if present, it should be fetched
1017 // by the previous CheckPrototypes. 1017 // by the previous CheckPrototypes.
1018 ASSERT(depth2 == kInvalidProtoDepth); 1018 ASSERT(depth2 == kInvalidProtoDepth);
1019 } 1019 }
1020 1020
1021 // Invoke function. 1021 // Invoke function.
1022 if (can_do_fast_api_call) { 1022 if (can_do_fast_api_call) {
1023 GenerateFastApiDirectCall( 1023 GenerateFastApiDirectCall(
1024 masm, optimization, arguments_.immediate(), false); 1024 masm, optimization, arguments_.immediate(), false);
1025 } else { 1025 } else {
1026 Handle<JSFunction> function = optimization.constant_function(); 1026 Handle<JSFunction> function = optimization.constant_function();
1027 stub_compiler_->GenerateJumpFunctionIgnoreReceiver(function); 1027 stub_compiler_->GenerateJumpFunction(object, function);
1028 } 1028 }
1029 1029
1030 // Deferred code for fast API call case---clean preallocated space. 1030 // Deferred code for fast API call case---clean preallocated space.
1031 if (can_do_fast_api_call) { 1031 if (can_do_fast_api_call) {
1032 __ bind(&miss_cleanup); 1032 __ bind(&miss_cleanup);
1033 FreeSpaceForFastApiCall(masm); 1033 FreeSpaceForFastApiCall(masm);
1034 __ Branch(miss_label); 1034 __ Branch(miss_label);
1035 } 1035 }
1036 1036
1037 // Invoke a regular function. 1037 // Invoke a regular function.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 Register scratch, 1076 Register scratch,
1077 Label* interceptor_succeeded) { 1077 Label* interceptor_succeeded) {
1078 { 1078 {
1079 FrameScope scope(masm, StackFrame::INTERNAL); 1079 FrameScope scope(masm, StackFrame::INTERNAL);
1080 1080
1081 __ Push(holder, name_); 1081 __ Push(holder, name_);
1082 CompileCallLoadPropertyWithInterceptor( 1082 CompileCallLoadPropertyWithInterceptor(
1083 masm, receiver, holder, name_, holder_obj, 1083 masm, receiver, holder, name_, holder_obj,
1084 IC::kLoadPropertyWithInterceptorOnly); 1084 IC::kLoadPropertyWithInterceptorOnly);
1085 __ pop(name_); // Restore the name. 1085 __ pop(name_); // Restore the name.
1086 __ pop(receiver); // Restore the holder. 1086 __ pop(holder); // Restore the holder.
1087 } 1087 }
1088 // If interceptor returns no-result sentinel, call the constant function. 1088 // If interceptor returns no-result sentinel, call the constant function.
1089 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); 1089 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex);
1090 __ Branch(interceptor_succeeded, ne, v0, Operand(scratch)); 1090 __ Branch(interceptor_succeeded, ne, v0, Operand(scratch));
1091 } 1091 }
1092 1092
1093 CallStubCompiler* stub_compiler_; 1093 CallStubCompiler* stub_compiler_;
1094 const ParameterCount& arguments_; 1094 const ParameterCount& arguments_;
1095 Register name_; 1095 Register name_;
1096 }; 1096 };
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 // ----------------------------------- 2882 // -----------------------------------
2883 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2883 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2884 } 2884 }
2885 2885
2886 2886
2887 #undef __ 2887 #undef __
2888 2888
2889 } } // namespace v8::internal 2889 } } // namespace v8::internal
2890 2890
2891 #endif // V8_TARGET_ARCH_MIPS 2891 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698