| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 static double* math_exp_log_table_array = NULL; | 110 static double* math_exp_log_table_array = NULL; |
| 111 | 111 |
| 112 // ----------------------------------------------------------------------------- | 112 // ----------------------------------------------------------------------------- |
| 113 // Implementation of AssemblerBase | 113 // Implementation of AssemblerBase |
| 114 | 114 |
| 115 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size) | 115 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size) |
| 116 : isolate_(isolate), | 116 : isolate_(isolate), |
| 117 jit_cookie_(0), | 117 jit_cookie_(0), |
| 118 enabled_cpu_features_(0), | 118 enabled_cpu_features_(0), |
| 119 emit_debug_code_(FLAG_debug_code), | 119 emit_debug_code_(FLAG_debug_code), |
| 120 emit_allocations_tracking_code_(false), |
| 120 predictable_code_size_(false) { | 121 predictable_code_size_(false) { |
| 121 if (FLAG_mask_constants_with_cookie && isolate != NULL) { | 122 if (FLAG_mask_constants_with_cookie && isolate != NULL) { |
| 122 jit_cookie_ = isolate->random_number_generator()->NextInt(); | 123 jit_cookie_ = isolate->random_number_generator()->NextInt(); |
| 123 } | 124 } |
| 124 | 125 |
| 125 if (buffer == NULL) { | 126 if (buffer == NULL) { |
| 126 // Do our own buffer management. | 127 // Do our own buffer management. |
| 127 if (buffer_size <= kMinimalBufferSize) { | 128 if (buffer_size <= kMinimalBufferSize) { |
| 128 buffer_size = kMinimalBufferSize; | 129 buffer_size = kMinimalBufferSize; |
| 129 if (isolate->assembler_spare_buffer() != NULL) { | 130 if (isolate->assembler_spare_buffer() != NULL) { |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1328 reinterpret_cast<void*>(&double_constants.canonical_non_hole_nan)); | 1329 reinterpret_cast<void*>(&double_constants.canonical_non_hole_nan)); |
| 1329 } | 1330 } |
| 1330 | 1331 |
| 1331 | 1332 |
| 1332 ExternalReference ExternalReference::address_of_the_hole_nan() { | 1333 ExternalReference ExternalReference::address_of_the_hole_nan() { |
| 1333 return ExternalReference( | 1334 return ExternalReference( |
| 1334 reinterpret_cast<void*>(&double_constants.the_hole_nan)); | 1335 reinterpret_cast<void*>(&double_constants.the_hole_nan)); |
| 1335 } | 1336 } |
| 1336 | 1337 |
| 1337 | 1338 |
| 1339 ExternalReference ExternalReference::record_object_allocation_function( |
| 1340 Isolate* isolate) { |
| 1341 return ExternalReference( |
| 1342 Redirect(isolate, |
| 1343 FUNCTION_ADDR(HeapProfiler::RecordObjectAllocationFromMasm))); |
| 1344 } |
| 1345 |
| 1346 |
| 1338 #ifndef V8_INTERPRETED_REGEXP | 1347 #ifndef V8_INTERPRETED_REGEXP |
| 1339 | 1348 |
| 1340 ExternalReference ExternalReference::re_check_stack_guard_state( | 1349 ExternalReference ExternalReference::re_check_stack_guard_state( |
| 1341 Isolate* isolate) { | 1350 Isolate* isolate) { |
| 1342 Address function; | 1351 Address function; |
| 1343 #if V8_TARGET_ARCH_X64 | 1352 #if V8_TARGET_ARCH_X64 |
| 1344 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 1353 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
| 1345 #elif V8_TARGET_ARCH_IA32 | 1354 #elif V8_TARGET_ARCH_IA32 |
| 1346 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 1355 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
| 1347 #elif V8_TARGET_ARCH_ARM | 1356 #elif V8_TARGET_ARCH_ARM |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1696 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1705 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1697 state_.written_position = state_.current_position; | 1706 state_.written_position = state_.current_position; |
| 1698 written = true; | 1707 written = true; |
| 1699 } | 1708 } |
| 1700 | 1709 |
| 1701 // Return whether something was written. | 1710 // Return whether something was written. |
| 1702 return written; | 1711 return written; |
| 1703 } | 1712 } |
| 1704 | 1713 |
| 1705 } } // namespace v8::internal | 1714 } } // namespace v8::internal |
| OLD | NEW |