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

Side by Side Diff: src/x87/code-stubs-x87.cc

Issue 2686723004: [stubs] Port LoadFunctionPrototypeStub to CSA (Closed)
Patch Set: Created 3 years, 10 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/x64/macro-assembler-x64.cc ('k') | src/x87/macro-assembler-x87.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 __ fstp_d(Operand(esp, 0 * kDoubleSize)); 274 __ fstp_d(Operand(esp, 0 * kDoubleSize));
275 // Put the double_exponent parameter in call stack 275 // Put the double_exponent parameter in call stack
276 __ fstp_d(Operand(esp, 1 * kDoubleSize)); 276 __ fstp_d(Operand(esp, 1 * kDoubleSize));
277 __ CallCFunction(ExternalReference::power_double_double_function(isolate()), 277 __ CallCFunction(ExternalReference::power_double_double_function(isolate()),
278 4); 278 4);
279 } 279 }
280 // Return value is in st(0) on ia32. 280 // Return value is in st(0) on ia32.
281 __ ret(0); 281 __ ret(0);
282 } 282 }
283 283
284
285 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
286 Label miss;
287 Register receiver = LoadDescriptor::ReceiverRegister();
288 // With careful management, we won't have to save slot and vector on
289 // the stack. Simply handle the possibly missing case first.
290 // TODO(mvstanton): this code can be more efficient.
291 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset),
292 Immediate(isolate()->factory()->the_hole_value()));
293 __ j(equal, &miss);
294 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss);
295 __ ret(0);
296
297 __ bind(&miss);
298 PropertyAccessCompiler::TailCallBuiltin(
299 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
300 }
301
302 void RegExpExecStub::Generate(MacroAssembler* masm) { 284 void RegExpExecStub::Generate(MacroAssembler* masm) {
303 // Just jump directly to runtime if native RegExp is not selected at compile 285 // Just jump directly to runtime if native RegExp is not selected at compile
304 // time or if regexp entry in generated code is turned off runtime switch or 286 // time or if regexp entry in generated code is turned off runtime switch or
305 // at compilation. 287 // at compilation.
306 #ifdef V8_INTERPRETED_REGEXP 288 #ifdef V8_INTERPRETED_REGEXP
307 __ TailCallRuntime(Runtime::kRegExpExec); 289 __ TailCallRuntime(Runtime::kRegExpExec);
308 #else // V8_INTERPRETED_REGEXP 290 #else // V8_INTERPRETED_REGEXP
309 291
310 // Stack frame on entry. 292 // Stack frame on entry.
311 // esp[0]: return address 293 // esp[0]: return address
(...skipping 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after
3917 kStackUnwindSpace, nullptr, return_value_operand, 3899 kStackUnwindSpace, nullptr, return_value_operand,
3918 NULL); 3900 NULL);
3919 } 3901 }
3920 3902
3921 #undef __ 3903 #undef __
3922 3904
3923 } // namespace internal 3905 } // namespace internal
3924 } // namespace v8 3906 } // namespace v8
3925 3907
3926 #endif // V8_TARGET_ARCH_X87 3908 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698