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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 138553002: MIPS: Remove CALL_AS_FUNCTION and CALL_AS_METHOD. (Closed) Base URL: https://github.com/v8/v8.git@gbl
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
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/ic-mips.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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 150 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
151 __ stop("stop-at"); 151 __ stop("stop-at");
152 } 152 }
153 #endif 153 #endif
154 154
155 // Classic mode functions and builtins need to replace the receiver with the 155 // Classic mode functions and builtins need to replace the receiver with the
156 // global proxy when called as functions (without an explicit receiver 156 // global proxy when called as functions (without an explicit receiver
157 // object). 157 // object).
158 if (info->is_classic_mode() && !info->is_native()) { 158 if (info->is_classic_mode() && !info->is_native()) {
159 Label ok; 159 Label ok;
160 __ Branch(&ok, eq, t1, Operand(zero_reg));
161 int receiver_offset = info->scope()->num_parameters() * kPointerSize; 160 int receiver_offset = info->scope()->num_parameters() * kPointerSize;
162 __ lw(at, MemOperand(sp, receiver_offset)); 161 __ lw(at, MemOperand(sp, receiver_offset));
163 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); 162 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex);
164 __ Branch(&ok, ne, a2, Operand(at)); 163 __ Branch(&ok, ne, a2, Operand(at));
165 164
166 __ lw(a2, GlobalObjectOperand()); 165 __ lw(a2, GlobalObjectOperand());
167 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset)); 166 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset));
168 167
169 __ sw(a2, MemOperand(sp, receiver_offset)); 168 __ sw(a2, MemOperand(sp, receiver_offset));
170 169
(...skipping 3623 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 3793
3795 Label runtime, done; 3794 Label runtime, done;
3796 // Check for non-function argument (including proxy). 3795 // Check for non-function argument (including proxy).
3797 __ JumpIfSmi(v0, &runtime); 3796 __ JumpIfSmi(v0, &runtime);
3798 __ GetObjectType(v0, a1, a1); 3797 __ GetObjectType(v0, a1, a1);
3799 __ Branch(&runtime, ne, a1, Operand(JS_FUNCTION_TYPE)); 3798 __ Branch(&runtime, ne, a1, Operand(JS_FUNCTION_TYPE));
3800 3799
3801 // InvokeFunction requires the function in a1. Move it in there. 3800 // InvokeFunction requires the function in a1. Move it in there.
3802 __ mov(a1, result_register()); 3801 __ mov(a1, result_register());
3803 ParameterCount count(arg_count); 3802 ParameterCount count(arg_count);
3804 __ InvokeFunction(a1, count, CALL_FUNCTION, 3803 __ InvokeFunction(a1, count, CALL_FUNCTION, NullCallWrapper());
3805 NullCallWrapper(), CALL_AS_FUNCTION);
3806 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3804 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3807 __ jmp(&done); 3805 __ jmp(&done);
3808 3806
3809 __ bind(&runtime); 3807 __ bind(&runtime);
3810 __ push(v0); 3808 __ push(v0);
3811 __ CallRuntime(Runtime::kCall, args->length()); 3809 __ CallRuntime(Runtime::kCall, args->length());
3812 __ bind(&done); 3810 __ bind(&done);
3813 3811
3814 context()->Plug(v0); 3812 context()->Plug(v0);
3815 } 3813 }
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
4970 Assembler::target_address_at(pc_immediate_load_address)) == 4968 Assembler::target_address_at(pc_immediate_load_address)) ==
4971 reinterpret_cast<uint32_t>( 4969 reinterpret_cast<uint32_t>(
4972 isolate->builtins()->OsrAfterStackCheck()->entry())); 4970 isolate->builtins()->OsrAfterStackCheck()->entry()));
4973 return OSR_AFTER_STACK_CHECK; 4971 return OSR_AFTER_STACK_CHECK;
4974 } 4972 }
4975 4973
4976 4974
4977 } } // namespace v8::internal 4975 } } // namespace v8::internal
4978 4976
4979 #endif // V8_TARGET_ARCH_MIPS 4977 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698