| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "runtime.h" | 52 #include "runtime.h" |
| 53 #include "serialize.h" | 53 #include "serialize.h" |
| 54 #include "store-buffer-inl.h" | 54 #include "store-buffer-inl.h" |
| 55 #include "stub-cache.h" | 55 #include "stub-cache.h" |
| 56 #include "token.h" | 56 #include "token.h" |
| 57 | 57 |
| 58 #if V8_TARGET_ARCH_IA32 | 58 #if V8_TARGET_ARCH_IA32 |
| 59 #include "ia32/assembler-ia32-inl.h" | 59 #include "ia32/assembler-ia32-inl.h" |
| 60 #elif V8_TARGET_ARCH_X64 | 60 #elif V8_TARGET_ARCH_X64 |
| 61 #include "x64/assembler-x64-inl.h" | 61 #include "x64/assembler-x64-inl.h" |
| 62 #elif V8_TARGET_ARCH_A64 |
| 63 #include "a64/assembler-a64-inl.h" |
| 62 #elif V8_TARGET_ARCH_ARM | 64 #elif V8_TARGET_ARCH_ARM |
| 63 #include "arm/assembler-arm-inl.h" | 65 #include "arm/assembler-arm-inl.h" |
| 64 #elif V8_TARGET_ARCH_MIPS | 66 #elif V8_TARGET_ARCH_MIPS |
| 65 #include "mips/assembler-mips-inl.h" | 67 #include "mips/assembler-mips-inl.h" |
| 66 #else | 68 #else |
| 67 #error "Unknown architecture." | 69 #error "Unknown architecture." |
| 68 #endif | 70 #endif |
| 69 | 71 |
| 70 // Include native regexp-macro-assembler. | 72 // Include native regexp-macro-assembler. |
| 71 #ifndef V8_INTERPRETED_REGEXP | 73 #ifndef V8_INTERPRETED_REGEXP |
| 72 #if V8_TARGET_ARCH_IA32 | 74 #if V8_TARGET_ARCH_IA32 |
| 73 #include "ia32/regexp-macro-assembler-ia32.h" | 75 #include "ia32/regexp-macro-assembler-ia32.h" |
| 74 #elif V8_TARGET_ARCH_X64 | 76 #elif V8_TARGET_ARCH_X64 |
| 75 #include "x64/regexp-macro-assembler-x64.h" | 77 #include "x64/regexp-macro-assembler-x64.h" |
| 78 #elif V8_TARGET_ARCH_A64 |
| 79 #include "a64/regexp-macro-assembler-a64.h" |
| 76 #elif V8_TARGET_ARCH_ARM | 80 #elif V8_TARGET_ARCH_ARM |
| 77 #include "arm/regexp-macro-assembler-arm.h" | 81 #include "arm/regexp-macro-assembler-arm.h" |
| 78 #elif V8_TARGET_ARCH_MIPS | 82 #elif V8_TARGET_ARCH_MIPS |
| 79 #include "mips/regexp-macro-assembler-mips.h" | 83 #include "mips/regexp-macro-assembler-mips.h" |
| 80 #else // Unknown architecture. | 84 #else // Unknown architecture. |
| 81 #error "Unknown architecture." | 85 #error "Unknown architecture." |
| 82 #endif // Target architecture. | 86 #endif // Target architecture. |
| 83 #endif // V8_INTERPRETED_REGEXP | 87 #endif // V8_INTERPRETED_REGEXP |
| 84 | 88 |
| 85 namespace v8 { | 89 namespace v8 { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 114 | 118 |
| 115 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size) | 119 AssemblerBase::AssemblerBase(Isolate* isolate, void* buffer, int buffer_size) |
| 116 : isolate_(isolate), | 120 : isolate_(isolate), |
| 117 jit_cookie_(0), | 121 jit_cookie_(0), |
| 118 enabled_cpu_features_(0), | 122 enabled_cpu_features_(0), |
| 119 emit_debug_code_(FLAG_debug_code), | 123 emit_debug_code_(FLAG_debug_code), |
| 120 predictable_code_size_(false) { | 124 predictable_code_size_(false) { |
| 121 if (FLAG_mask_constants_with_cookie && isolate != NULL) { | 125 if (FLAG_mask_constants_with_cookie && isolate != NULL) { |
| 122 jit_cookie_ = V8::RandomPrivate(isolate); | 126 jit_cookie_ = V8::RandomPrivate(isolate); |
| 123 } | 127 } |
| 124 | |
| 125 if (buffer == NULL) { | 128 if (buffer == NULL) { |
| 126 // Do our own buffer management. | 129 // Do our own buffer management. |
| 127 if (buffer_size <= kMinimalBufferSize) { | 130 if (buffer_size <= kMinimalBufferSize) { |
| 128 buffer_size = kMinimalBufferSize; | 131 buffer_size = kMinimalBufferSize; |
| 129 if (isolate->assembler_spare_buffer() != NULL) { | 132 if (isolate->assembler_spare_buffer() != NULL) { |
| 130 buffer = isolate->assembler_spare_buffer(); | 133 buffer = isolate->assembler_spare_buffer(); |
| 131 isolate->set_assembler_spare_buffer(NULL); | 134 isolate->set_assembler_spare_buffer(NULL); |
| 132 } | 135 } |
| 133 } | 136 } |
| 134 if (buffer == NULL) buffer = NewArray<byte>(buffer_size); | 137 if (buffer == NULL) buffer = NewArray<byte>(buffer_size); |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 | 1308 |
| 1306 #ifndef V8_INTERPRETED_REGEXP | 1309 #ifndef V8_INTERPRETED_REGEXP |
| 1307 | 1310 |
| 1308 ExternalReference ExternalReference::re_check_stack_guard_state( | 1311 ExternalReference ExternalReference::re_check_stack_guard_state( |
| 1309 Isolate* isolate) { | 1312 Isolate* isolate) { |
| 1310 Address function; | 1313 Address function; |
| 1311 #ifdef V8_TARGET_ARCH_X64 | 1314 #ifdef V8_TARGET_ARCH_X64 |
| 1312 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 1315 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
| 1313 #elif V8_TARGET_ARCH_IA32 | 1316 #elif V8_TARGET_ARCH_IA32 |
| 1314 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 1317 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
| 1318 #elif V8_TARGET_ARCH_A64 |
| 1319 function = FUNCTION_ADDR(RegExpMacroAssemblerA64::CheckStackGuardState); |
| 1315 #elif V8_TARGET_ARCH_ARM | 1320 #elif V8_TARGET_ARCH_ARM |
| 1316 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); | 1321 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); |
| 1317 #elif V8_TARGET_ARCH_MIPS | 1322 #elif V8_TARGET_ARCH_MIPS |
| 1318 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); | 1323 function = FUNCTION_ADDR(RegExpMacroAssemblerMIPS::CheckStackGuardState); |
| 1319 #else | 1324 #else |
| 1320 UNREACHABLE(); | 1325 UNREACHABLE(); |
| 1321 #endif | 1326 #endif |
| 1322 return ExternalReference(Redirect(isolate, function)); | 1327 return ExternalReference(Redirect(isolate, function)); |
| 1323 } | 1328 } |
| 1324 | 1329 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1667 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1663 state_.written_position = state_.current_position; | 1668 state_.written_position = state_.current_position; |
| 1664 written = true; | 1669 written = true; |
| 1665 } | 1670 } |
| 1666 | 1671 |
| 1667 // Return whether something was written. | 1672 // Return whether something was written. |
| 1668 return written; | 1673 return written; |
| 1669 } | 1674 } |
| 1670 | 1675 |
| 1671 } } // namespace v8::internal | 1676 } } // namespace v8::internal |
| OLD | NEW |