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

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

Issue 131743012: Merged r18293, r18294, r18295, r18328 into 3.23 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.23
Patch Set: Created 6 years, 11 months 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 | src/version.cc » ('j') | 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, scratch2, 1002 LoadWithInterceptor(masm, receiver, holder, interceptor_holder, scratch2,
1003 &regular_invoke); 1003 &regular_invoke);
1004 1004
1005 // Interceptor returned nothing for this property. Try to use cached 1005 // Interceptor returned nothing for this property. Try to use cached
1006 // constant function. 1006 // constant function.
1007 1007
1008 // Check that the maps from interceptor's holder to constant function's 1008 // Check that the maps from interceptor's holder to constant function's
1009 // holder haven't changed and thus we can use cached constant function. 1009 // holder haven't changed and thus we can use cached constant function.
1010 if (*interceptor_holder != lookup->holder()) { 1010 if (*interceptor_holder != lookup->holder()) {
1011 stub_compiler_->CheckPrototypes( 1011 stub_compiler_->CheckPrototypes(
1012 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver, 1012 IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
1013 handle(lookup->holder()), scratch1, scratch2, scratch3, 1013 handle(lookup->holder()), scratch1, scratch2, scratch3,
1014 name, depth2, miss); 1014 name, depth2, miss);
1015 } else { 1015 } else {
1016 // CheckPrototypes has a side effect of fetching a 'holder' 1016 // CheckPrototypes has a side effect of fetching a 'holder'
1017 // for API (object which is instanceof for the signature). It's 1017 // for API (object which is instanceof for the signature). It's
1018 // safe to omit it here, as if present, it should be fetched 1018 // safe to omit it here, as if present, it should be fetched
1019 // by the previous CheckPrototypes. 1019 // by the previous CheckPrototypes.
1020 ASSERT(depth2 == kInvalidProtoDepth); 1020 ASSERT(depth2 == kInvalidProtoDepth);
1021 } 1021 }
1022 1022
1023 // Invoke function. 1023 // Invoke function.
1024 if (can_do_fast_api_call) { 1024 if (can_do_fast_api_call) {
1025 GenerateFastApiDirectCall( 1025 GenerateFastApiDirectCall(
1026 masm, optimization, arguments_.immediate(), false); 1026 masm, optimization, arguments_.immediate(), false);
1027 } else { 1027 } else {
1028 Handle<JSFunction> function = optimization.constant_function(); 1028 Handle<JSFunction> function = optimization.constant_function();
1029 stub_compiler_->GenerateJumpFunctionIgnoreReceiver(function); 1029 __ Move(a0, receiver);
1030 stub_compiler_->GenerateJumpFunction(object, function);
1030 } 1031 }
1031 1032
1032 // Deferred code for fast API call case---clean preallocated space. 1033 // Deferred code for fast API call case---clean preallocated space.
1033 if (can_do_fast_api_call) { 1034 if (can_do_fast_api_call) {
1034 __ bind(&miss_cleanup); 1035 __ bind(&miss_cleanup);
1035 FreeSpaceForFastApiCall(masm); 1036 FreeSpaceForFastApiCall(masm);
1036 __ Branch(miss_label); 1037 __ Branch(miss_label);
1037 } 1038 }
1038 1039
1039 // Invoke a regular function. 1040 // Invoke a regular function.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 1074
1074 void LoadWithInterceptor(MacroAssembler* masm, 1075 void LoadWithInterceptor(MacroAssembler* masm,
1075 Register receiver, 1076 Register receiver,
1076 Register holder, 1077 Register holder,
1077 Handle<JSObject> holder_obj, 1078 Handle<JSObject> holder_obj,
1078 Register scratch, 1079 Register scratch,
1079 Label* interceptor_succeeded) { 1080 Label* interceptor_succeeded) {
1080 { 1081 {
1081 FrameScope scope(masm, StackFrame::INTERNAL); 1082 FrameScope scope(masm, StackFrame::INTERNAL);
1082 1083
1083 __ Push(holder, name_); 1084 __ Push(receiver, holder, name_);
1084 CompileCallLoadPropertyWithInterceptor( 1085 CompileCallLoadPropertyWithInterceptor(
1085 masm, receiver, holder, name_, holder_obj, 1086 masm, receiver, holder, name_, holder_obj,
1086 IC::kLoadPropertyWithInterceptorOnly); 1087 IC::kLoadPropertyWithInterceptorOnly);
1087 __ pop(name_); // Restore the name. 1088 __ pop(name_);
1088 __ pop(receiver); // Restore the holder. 1089 __ pop(holder);
1090 __ pop(receiver);
1089 } 1091 }
1090 // If interceptor returns no-result sentinel, call the constant function. 1092 // If interceptor returns no-result sentinel, call the constant function.
1091 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); 1093 __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex);
1092 __ Branch(interceptor_succeeded, ne, v0, Operand(scratch)); 1094 __ Branch(interceptor_succeeded, ne, v0, Operand(scratch));
1093 } 1095 }
1094 1096
1095 CallStubCompiler* stub_compiler_; 1097 CallStubCompiler* stub_compiler_;
1096 const ParameterCount& arguments_; 1098 const ParameterCount& arguments_;
1097 Register name_; 1099 Register name_;
1098 ExtraICState extra_ic_state_; 1100 ExtraICState extra_ic_state_;
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 // ----------------------------------- 2887 // -----------------------------------
2886 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2888 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2887 } 2889 }
2888 2890
2889 2891
2890 #undef __ 2892 #undef __
2891 2893
2892 } } // namespace v8::internal 2894 } } // namespace v8::internal
2893 2895
2894 #endif // V8_TARGET_ARCH_MIPS 2896 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698