| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 #include <cmath> | 37 #include <cmath> |
| 38 #include "api.h" | 38 #include "api.h" |
| 39 #include "builtins.h" | 39 #include "builtins.h" |
| 40 #include "counters.h" | 40 #include "counters.h" |
| 41 #include "cpu.h" | 41 #include "cpu.h" |
| 42 #include "debug.h" | 42 #include "debug.h" |
| 43 #include "deoptimizer.h" | 43 #include "deoptimizer.h" |
| 44 #include "execution.h" | 44 #include "execution.h" |
| 45 #include "ic.h" | 45 #include "ic.h" |
| 46 #include "isolate.h" | 46 #include "isolate-inl.h" |
| 47 #include "jsregexp.h" | 47 #include "jsregexp.h" |
| 48 #include "lazy-instance.h" | 48 #include "lazy-instance.h" |
| 49 #include "platform.h" | 49 #include "platform.h" |
| 50 #include "regexp-macro-assembler.h" | 50 #include "regexp-macro-assembler.h" |
| 51 #include "regexp-stack.h" | 51 #include "regexp-stack.h" |
| 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" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 predictable_code_size_(false) { | 120 predictable_code_size_(false) { |
| 121 if (FLAG_mask_constants_with_cookie && isolate != NULL) { | 121 if (FLAG_mask_constants_with_cookie && isolate != NULL) { |
| 122 jit_cookie_ = V8::RandomPrivate(isolate); | 122 jit_cookie_ = isolate->random_number_generator()->NextInt(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 if (buffer == NULL) { | 125 if (buffer == NULL) { |
| 126 // Do our own buffer management. | 126 // Do our own buffer management. |
| 127 if (buffer_size <= kMinimalBufferSize) { | 127 if (buffer_size <= kMinimalBufferSize) { |
| 128 buffer_size = kMinimalBufferSize; | 128 buffer_size = kMinimalBufferSize; |
| 129 if (isolate->assembler_spare_buffer() != NULL) { | 129 if (isolate->assembler_spare_buffer() != NULL) { |
| 130 buffer = isolate->assembler_spare_buffer(); | 130 buffer = isolate->assembler_spare_buffer(); |
| 131 isolate->set_assembler_spare_buffer(NULL); | 131 isolate->set_assembler_spare_buffer(NULL); |
| 132 } | 132 } |
| (...skipping 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1676 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1676 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1677 state_.written_position = state_.current_position; | 1677 state_.written_position = state_.current_position; |
| 1678 written = true; | 1678 written = true; |
| 1679 } | 1679 } |
| 1680 | 1680 |
| 1681 // Return whether something was written. | 1681 // Return whether something was written. |
| 1682 return written; | 1682 return written; |
| 1683 } | 1683 } |
| 1684 | 1684 |
| 1685 } } // namespace v8::internal | 1685 } } // namespace v8::internal |
| OLD | NEW |