Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: runtime/bin/dfe.h

Issue 2933203004: Replace the --platform vm option with --kernel-binaries option. (Closed)
Patch Set: s/set_kernel_binaries_directory/SetKernelBinaries Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/bin/dfe.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef RUNTIME_BIN_DFE_H_ 5 #ifndef RUNTIME_BIN_DFE_H_
6 #define RUNTIME_BIN_DFE_H_ 6 #define RUNTIME_BIN_DFE_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
11 #include "platform/globals.h" 11 #include "platform/globals.h"
12 12
13 namespace dart { 13 namespace dart {
14 namespace bin { 14 namespace bin {
15 15
16 class DFE { 16 class DFE {
17 public: 17 public:
18 DFE(); 18 DFE();
19 ~DFE(); 19 ~DFE();
20 20
21 const char* frontend_filename() const { return frontend_filename_; } 21 const char* frontend_filename() const { return frontend_filename_; }
22 void set_frontend_filename(const char* name) { frontend_filename_ = name; } 22 void set_frontend_filename(const char* name) { frontend_filename_ = name; }
23 bool UseDartFrontend() const { return frontend_filename_ != NULL; } 23 bool UseDartFrontend() const { return frontend_filename_ != NULL; }
24 24
25 const char* platform_binary_filename() const { 25 const char* platform_binary_filename() const {
26 return platform_binary_filename_; 26 return platform_binary_filename_;
27 } 27 }
28 void set_platform_binary_filename(const char* name) { 28
29 platform_binary_filename_ = name; 29 void SetKernelBinaries(const char* name);
30 } 30
31 bool UsePlatformBinary() const { return platform_binary_filename_ != NULL; } 31 bool UsePlatformBinary() const { return platform_binary_filename_ != NULL; }
32 32
33 void* kernel_platform() const { return kernel_platform_; } 33 void* kernel_platform() const { return kernel_platform_; }
34 34
35 // Method to reload a script into a running a isolate. 35 // Method to reload a script into a running a isolate.
36 // If the specified script [url] is not a kernel IR, compile it first using 36 // If the specified script [url] is not a kernel IR, compile it first using
37 // DFE and then reload the resulting kernel IR into the isolate. 37 // DFE and then reload the resulting kernel IR into the isolate.
38 // Returns Dart_Null if successful, otherwise an error object is returned. 38 // Returns Dart_Null if successful, otherwise an error object is returned.
39 Dart_Handle ReloadScript(Dart_Isolate isolate, const char* url_string); 39 Dart_Handle ReloadScript(Dart_Isolate isolate, const char* url_string);
40 40
(...skipping 18 matching lines...) Expand all
59 // Tries to read [script_uri] as a Kernel IR file. 59 // Tries to read [script_uri] as a Kernel IR file.
60 // Returns `true` if successful and sets [kernel_file] and [kernel_length] 60 // Returns `true` if successful and sets [kernel_file] and [kernel_length]
61 // to be the kernel IR contents. 61 // to be the kernel IR contents.
62 // The caller is responsible for free()ing [kernel_file] if `true` 62 // The caller is responsible for free()ing [kernel_file] if `true`
63 // was returned. 63 // was returned.
64 bool TryReadKernelFile(const char* script_uri, 64 bool TryReadKernelFile(const char* script_uri,
65 const uint8_t** kernel_ir, 65 const uint8_t** kernel_ir,
66 intptr_t* kernel_ir_size); 66 intptr_t* kernel_ir_size);
67 67
68 const char* frontend_filename_; 68 const char* frontend_filename_;
69 const char* platform_binary_filename_; 69 char* platform_binary_filename_;
70 void* kernel_platform_; 70 void* kernel_platform_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(DFE); 72 DISALLOW_COPY_AND_ASSIGN(DFE);
73 }; 73 };
74 74
75 } // namespace bin 75 } // namespace bin
76 } // namespace dart 76 } // namespace dart
77 77
78 #endif // RUNTIME_BIN_DFE_H_ 78 #endif // RUNTIME_BIN_DFE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/dfe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698