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 28 matching lines...) Expand all Loading... |
39 #include "src/base/cpu.h" | 39 #include "src/base/cpu.h" |
40 #include "src/base/functional.h" | 40 #include "src/base/functional.h" |
41 #include "src/base/lazy-instance.h" | 41 #include "src/base/lazy-instance.h" |
42 #include "src/base/platform/platform.h" | 42 #include "src/base/platform/platform.h" |
43 #include "src/base/utils/random-number-generator.h" | 43 #include "src/base/utils/random-number-generator.h" |
44 #include "src/builtins.h" | 44 #include "src/builtins.h" |
45 #include "src/codegen.h" | 45 #include "src/codegen.h" |
46 #include "src/counters.h" | 46 #include "src/counters.h" |
47 #include "src/debug/debug.h" | 47 #include "src/debug/debug.h" |
48 #include "src/deoptimizer.h" | 48 #include "src/deoptimizer.h" |
| 49 #include "src/disassembler.h" |
49 #include "src/execution.h" | 50 #include "src/execution.h" |
50 #include "src/ic/ic.h" | 51 #include "src/ic/ic.h" |
51 #include "src/ic/stub-cache.h" | 52 #include "src/ic/stub-cache.h" |
| 53 #include "src/ostreams.h" |
52 #include "src/profiler/cpu-profiler.h" | 54 #include "src/profiler/cpu-profiler.h" |
53 #include "src/regexp/jsregexp.h" | 55 #include "src/regexp/jsregexp.h" |
54 #include "src/regexp/regexp-macro-assembler.h" | 56 #include "src/regexp/regexp-macro-assembler.h" |
55 #include "src/regexp/regexp-stack.h" | 57 #include "src/regexp/regexp-stack.h" |
56 #include "src/register-configuration.h" | 58 #include "src/register-configuration.h" |
57 #include "src/runtime/runtime.h" | 59 #include "src/runtime/runtime.h" |
58 #include "src/simulator.h" // For flushing instruction cache. | 60 #include "src/simulator.h" // For flushing instruction cache. |
59 #include "src/snapshot/serialize.h" | 61 #include "src/snapshot/serialize.h" |
60 #include "src/token.h" | 62 #include "src/token.h" |
61 | 63 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 Isolate* isolate; | 210 Isolate* isolate; |
209 #if defined(USE_SIMULATOR) | 211 #if defined(USE_SIMULATOR) |
210 isolate = Isolate::Current(); | 212 isolate = Isolate::Current(); |
211 #else | 213 #else |
212 isolate = nullptr; | 214 isolate = nullptr; |
213 #endif // USE_SIMULATOR | 215 #endif // USE_SIMULATOR |
214 FlushICache(isolate, start, size); | 216 FlushICache(isolate, start, size); |
215 } | 217 } |
216 | 218 |
217 | 219 |
| 220 void AssemblerBase::Print() { |
| 221 OFStream os(stdout); |
| 222 v8::internal::Disassembler::Decode(isolate(), &os, buffer_, pc_, nullptr); |
| 223 } |
| 224 |
| 225 |
218 // ----------------------------------------------------------------------------- | 226 // ----------------------------------------------------------------------------- |
219 // Implementation of PredictableCodeSizeScope | 227 // Implementation of PredictableCodeSizeScope |
220 | 228 |
221 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler) | 229 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler) |
222 : PredictableCodeSizeScope(assembler, -1) {} | 230 : PredictableCodeSizeScope(assembler, -1) {} |
223 | 231 |
224 | 232 |
225 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler, | 233 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler, |
226 int expected_size) | 234 int expected_size) |
227 : assembler_(assembler), | 235 : assembler_(assembler), |
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1892 | 1900 |
1893 | 1901 |
1894 void Assembler::DataAlign(int m) { | 1902 void Assembler::DataAlign(int m) { |
1895 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1903 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
1896 while ((pc_offset() & (m - 1)) != 0) { | 1904 while ((pc_offset() & (m - 1)) != 0) { |
1897 db(0); | 1905 db(0); |
1898 } | 1906 } |
1899 } | 1907 } |
1900 } // namespace internal | 1908 } // namespace internal |
1901 } // namespace v8 | 1909 } // namespace v8 |
OLD | NEW |