OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <map> | 5 #include <map> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 #include "vm/kernel.h" | 10 #include "vm/kernel.h" |
11 #include "vm/os.h" | 11 #include "vm/os.h" |
12 | 12 |
13 #if defined(DEBUG) | 13 #if defined(DEBUG) |
14 #define TRACE_READ_OFFSET() do { \ | 14 #define TRACE_READ_OFFSET() \ |
15 if (FLAG_trace_kernel_binary) \ | 15 do { \ |
16 reader->DumpOffset(DART_PRETTY_FUNCTION); \ | 16 if (FLAG_trace_kernel_binary) reader->DumpOffset(DART_PRETTY_FUNCTION); \ |
17 } while (0) | 17 } while (0) |
18 #define TRACE_WRITE_OFFSET() do { \ | 18 #define TRACE_WRITE_OFFSET() \ |
19 if (FLAG_trace_kernel_binary) \ | 19 do { \ |
20 writer->DumpOffset(DART_PRETTY_FUNCTION); \ | 20 if (FLAG_trace_kernel_binary) writer->DumpOffset(DART_PRETTY_FUNCTION); \ |
21 } while (0) | 21 } while (0) |
22 #else | 22 #else |
23 #define TRACE_READ_OFFSET() | 23 #define TRACE_READ_OFFSET() |
24 #define TRACE_WRITE_OFFSET() | 24 #define TRACE_WRITE_OFFSET() |
25 #endif | 25 #endif |
26 | 26 |
27 namespace dart { | 27 namespace dart { |
28 | 28 |
29 | 29 |
30 ByteWriter::~ByteWriter() {} | 30 ByteWriter::~ByteWriter() {} |
(...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2894 | 2894 |
2895 void WritePrecompiledKernel(ByteWriter* byte_writer, kernel::Program* program) { | 2895 void WritePrecompiledKernel(ByteWriter* byte_writer, kernel::Program* program) { |
2896 ASSERT(byte_writer != NULL); | 2896 ASSERT(byte_writer != NULL); |
2897 | 2897 |
2898 kernel::Writer writer(byte_writer); | 2898 kernel::Writer writer(byte_writer); |
2899 program->WriteTo(&writer); | 2899 program->WriteTo(&writer); |
2900 } | 2900 } |
2901 | 2901 |
2902 | 2902 |
2903 } // namespace dart | 2903 } // namespace dart |
OLD | NEW |