OLD | NEW |
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 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 result_size); | 1926 result_size); |
1927 } | 1927 } |
1928 | 1928 |
1929 | 1929 |
1930 // If true, a Handle<T> returned by value from a function with cdecl calling | 1930 // If true, a Handle<T> returned by value from a function with cdecl calling |
1931 // convention will be returned directly as a value of location_ field in a | 1931 // convention will be returned directly as a value of location_ field in a |
1932 // register eax. | 1932 // register eax. |
1933 // If false, it is returned as a pointer to a preallocated by caller memory | 1933 // If false, it is returned as a pointer to a preallocated by caller memory |
1934 // region. Pointer to this region should be passed to a function as an | 1934 // region. Pointer to this region should be passed to a function as an |
1935 // implicit first argument. | 1935 // implicit first argument. |
1936 #if defined(USING_BSD_ABI) || defined(__MINGW32__) || defined(__CYGWIN__) | 1936 #if V8_OS_BSD4 || V8_OS_MINGW32 || V8_OS_CYGWIN |
1937 static const bool kReturnHandlesDirectly = true; | 1937 static const bool kReturnHandlesDirectly = true; |
1938 #else | 1938 #else |
1939 static const bool kReturnHandlesDirectly = false; | 1939 static const bool kReturnHandlesDirectly = false; |
1940 #endif | 1940 #endif |
1941 | 1941 |
1942 | 1942 |
1943 Operand ApiParameterOperand(int index, bool returns_handle) { | 1943 Operand ApiParameterOperand(int index, bool returns_handle) { |
1944 int offset = (index +(kReturnHandlesDirectly || !returns_handle ? 0 : 1)); | 1944 int offset = (index +(kReturnHandlesDirectly || !returns_handle ? 0 : 1)); |
1945 return Operand(esp, offset * kPointerSize); | 1945 return Operand(esp, offset * kPointerSize); |
1946 } | 1946 } |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3186 j(greater, &no_memento_available); | 3186 j(greater, &no_memento_available); |
3187 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), | 3187 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), |
3188 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map()))); | 3188 Immediate(Handle<Map>(isolate()->heap()->allocation_memento_map()))); |
3189 bind(&no_memento_available); | 3189 bind(&no_memento_available); |
3190 } | 3190 } |
3191 | 3191 |
3192 | 3192 |
3193 } } // namespace v8::internal | 3193 } } // namespace v8::internal |
3194 | 3194 |
3195 #endif // V8_TARGET_ARCH_IA32 | 3195 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |