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

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

Issue 5004004: Port direct API function call to x64 (ia32 CL is http://codereview.chromium.o... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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/x64/code-stubs-x64.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 const int kApiStackSpace = 4; 500 const int kApiStackSpace = 4;
501 501
502 __ PrepareCallApiFunction(argc + kFastApiCallArguments + 1, 502 __ PrepareCallApiFunction(argc + kFastApiCallArguments + 1,
503 kApiArgc + kApiStackSpace); 503 kApiArgc + kApiStackSpace);
504 504
505 __ mov(ApiParameterOperand(1), eax); // v8::Arguments::implicit_args_. 505 __ mov(ApiParameterOperand(1), eax); // v8::Arguments::implicit_args_.
506 __ add(Operand(eax), Immediate(argc * kPointerSize)); 506 __ add(Operand(eax), Immediate(argc * kPointerSize));
507 __ mov(ApiParameterOperand(2), eax); // v8::Arguments::values_. 507 __ mov(ApiParameterOperand(2), eax); // v8::Arguments::values_.
508 __ Set(ApiParameterOperand(3), Immediate(argc)); // v8::Arguments::length_. 508 __ Set(ApiParameterOperand(3), Immediate(argc)); // v8::Arguments::length_.
509 // v8::Arguments::is_construct_call_. 509 // v8::Arguments::is_construct_call_.
510 __ mov(ApiParameterOperand(4), Immediate(0)); 510 __ Set(ApiParameterOperand(4), Immediate(0));
511 511
512 // v8::InvocationCallback's argument. 512 // v8::InvocationCallback's argument.
513 __ lea(eax, ApiParameterOperand(1)); 513 __ lea(eax, ApiParameterOperand(1));
514 __ mov(ApiParameterOperand(0), eax); 514 __ mov(ApiParameterOperand(0), eax);
515 515
516 // Emitting a stub call may try to allocate (if the code is not 516 // Emitting a stub call may try to allocate (if the code is not
517 // already generated). Do not allow the assembler to perform a 517 // already generated). Do not allow the assembler to perform a
518 // garbage collection but instead return the allocation failure 518 // garbage collection but instead return the allocation failure
519 // object. 519 // object.
520 MaybeObject* result = 520 MaybeObject* result =
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
3147 // Return the generated code. 3147 // Return the generated code.
3148 return GetCode(); 3148 return GetCode();
3149 } 3149 }
3150 3150
3151 3151
3152 #undef __ 3152 #undef __
3153 3153
3154 } } // namespace v8::internal 3154 } } // namespace v8::internal
3155 3155
3156 #endif // V8_TARGET_ARCH_IA32 3156 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698