OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 ExternalReference(fid), num_arguments, result_size); | 1276 ExternalReference(fid), num_arguments, result_size); |
1277 } | 1277 } |
1278 | 1278 |
1279 | 1279 |
1280 // If true, a Handle<T> returned by value from a function with cdecl calling | 1280 // If true, a Handle<T> returned by value from a function with cdecl calling |
1281 // convention will be returned directly as a value of location_ field in a | 1281 // convention will be returned directly as a value of location_ field in a |
1282 // register eax. | 1282 // register eax. |
1283 // If false, it is returned as a pointer to a preallocated by caller memory | 1283 // If false, it is returned as a pointer to a preallocated by caller memory |
1284 // region. Pointer to this region should be passed to a function as an | 1284 // region. Pointer to this region should be passed to a function as an |
1285 // implicit first argument. | 1285 // implicit first argument. |
1286 #if defined(USING_BSD_ABI) || defined(__MINGW32__) | 1286 #if defined(USING_BSD_ABI) || defined(__MINGW32__) || defined(__CYGWIN__) |
1287 static const bool kReturnHandlesDirectly = true; | 1287 static const bool kReturnHandlesDirectly = true; |
1288 #else | 1288 #else |
1289 static const bool kReturnHandlesDirectly = false; | 1289 static const bool kReturnHandlesDirectly = false; |
1290 #endif | 1290 #endif |
1291 | 1291 |
1292 | 1292 |
1293 Operand ApiParameterOperand(int index) { | 1293 Operand ApiParameterOperand(int index) { |
1294 return Operand( | 1294 return Operand( |
1295 esp, (index + (kReturnHandlesDirectly ? 0 : 1)) * kPointerSize); | 1295 esp, (index + (kReturnHandlesDirectly ? 0 : 1)) * kPointerSize); |
1296 } | 1296 } |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2000 | 2000 |
2001 // Check that the code was patched as expected. | 2001 // Check that the code was patched as expected. |
2002 ASSERT(masm_.pc_ == address_ + size_); | 2002 ASSERT(masm_.pc_ == address_ + size_); |
2003 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2003 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2004 } | 2004 } |
2005 | 2005 |
2006 | 2006 |
2007 } } // namespace v8::internal | 2007 } } // namespace v8::internal |
2008 | 2008 |
2009 #endif // V8_TARGET_ARCH_IA32 | 2009 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |