Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 "bin/dfe.h" | 5 #include "bin/dfe.h" |
| 6 #include "bin/dartutils.h" | 6 #include "bin/dartutils.h" |
| 7 #include "bin/error_exit.h" | 7 #include "bin/error_exit.h" |
| 8 #include "bin/file.h" | 8 #include "bin/file.h" |
| 9 | 9 |
| 10 #include "vm/kernel.h" | 10 #include "vm/kernel.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 delete reinterpret_cast<kernel::Program*>(kernel_platform_); | 35 delete reinterpret_cast<kernel::Program*>(kernel_platform_); |
| 36 kernel_platform_ = NULL; | 36 kernel_platform_ = NULL; |
| 37 } | 37 } |
| 38 | 38 |
| 39 if (kernel_vmservice_io_ != NULL) { | 39 if (kernel_vmservice_io_ != NULL) { |
| 40 delete reinterpret_cast<kernel::Program*>(kernel_vmservice_io_); | 40 delete reinterpret_cast<kernel::Program*>(kernel_vmservice_io_); |
| 41 kernel_vmservice_io_ = NULL; | 41 kernel_vmservice_io_ = NULL; |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 void DFE::unset_kernel_vmservice_io() { | |
|
Kevin Millikin (Google)
2017/08/14 06:20:50
"unset" isn't really a word. Usually "clear" is t
jensj
2017/08/14 08:38:12
Renaming to 'clear_kernel_vmservice_io' as I find
| |
| 46 kernel_vmservice_io_ = NULL; | |
| 47 } | |
| 48 | |
| 45 void DFE::SetKernelBinaries(const char* name) { | 49 void DFE::SetKernelBinaries(const char* name) { |
| 46 intptr_t len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(), | 50 intptr_t len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(), |
| 47 kPlatformBinaryName) + | 51 kPlatformBinaryName) + |
| 48 1; | 52 1; |
| 49 platform_binary_filename_ = new char[len]; | 53 platform_binary_filename_ = new char[len]; |
| 50 snprintf(platform_binary_filename_, len, "%s%s%s", name, | 54 snprintf(platform_binary_filename_, len, "%s%s%s", name, |
| 51 File::PathSeparator(), kPlatformBinaryName); | 55 File::PathSeparator(), kPlatformBinaryName); |
| 52 | 56 |
| 53 len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(), | 57 len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(), |
| 54 kVMServiceIOBinaryName) + | 58 kVMServiceIOBinaryName) + |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 *kernel_ir = buffer; | 164 *kernel_ir = buffer; |
| 161 return true; | 165 return true; |
| 162 } | 166 } |
| 163 } | 167 } |
| 164 } | 168 } |
| 165 return false; | 169 return false; |
| 166 } | 170 } |
| 167 | 171 |
| 168 } // namespace bin | 172 } // namespace bin |
| 169 } // namespace dart | 173 } // namespace dart |
| OLD | NEW |