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

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

Issue 2894773004: Changes to make isolate reload functionality work with the --dfe option. (Closed)
Patch Set: Fix regression test errors. Created 3 years, 7 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 | « runtime/bin/bin.gypi ('k') | runtime/bin/dartutils.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_DARTUTILS_H_ 5 #ifndef RUNTIME_BIN_DARTUTILS_H_
6 #define RUNTIME_BIN_DARTUTILS_H_ 6 #define RUNTIME_BIN_DARTUTILS_H_
7 7
8 #include "bin/isolate_data.h" 8 #include "bin/isolate_data.h"
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_native_api.h" 10 #include "include/dart_native_api.h"
(...skipping 15 matching lines...) Expand all
26 * functions can also be nested without this error check, since all 26 * functions can also be nested without this error check, since all
27 * API functions return any error handles passed in as arguments, unchanged. 27 * API functions return any error handles passed in as arguments, unchanged.
28 */ 28 */
29 static inline Dart_Handle ThrowIfError(Dart_Handle handle) { 29 static inline Dart_Handle ThrowIfError(Dart_Handle handle) {
30 if (Dart_IsError(handle)) { 30 if (Dart_IsError(handle)) {
31 Dart_PropagateError(handle); 31 Dart_PropagateError(handle);
32 } 32 }
33 return handle; 33 return handle;
34 } 34 }
35 35
36 // Tries to read [script_uri] as a Kernel IR file. If successful this function
37 // returns `true` and sets [kernel_file] and [kernel_length] to be the memory
38 // contents.
39 //
40 // The caller is responsible for free()ing [kernel_file] if `true` was returned.
41 bool TryReadKernel(const char* script_uri,
42 const uint8_t** kernel_file,
43 intptr_t* kernel_length);
44 36
45 class CommandLineOptions { 37 class CommandLineOptions {
46 public: 38 public:
47 explicit CommandLineOptions(int max_count) 39 explicit CommandLineOptions(int max_count)
48 : count_(0), max_count_(max_count), arguments_(NULL) { 40 : count_(0), max_count_(max_count), arguments_(NULL) {
49 static const int kWordSize = sizeof(intptr_t); 41 static const int kWordSize = sizeof(intptr_t);
50 arguments_ = reinterpret_cast<const char**>(malloc(max_count * kWordSize)); 42 arguments_ = reinterpret_cast<const char**>(malloc(max_count * kWordSize));
51 if (arguments_ == NULL) { 43 if (arguments_ == NULL) {
52 max_count_ = 0; 44 max_count_ = 0;
53 } 45 }
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 bool is_typed_data_; 665 bool is_typed_data_;
674 666
675 DISALLOW_ALLOCATION(); 667 DISALLOW_ALLOCATION();
676 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer); 668 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer);
677 }; 669 };
678 670
679 } // namespace bin 671 } // namespace bin
680 } // namespace dart 672 } // namespace dart
681 673
682 #endif // RUNTIME_BIN_DARTUTILS_H_ 674 #endif // RUNTIME_BIN_DARTUTILS_H_
OLDNEW
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/bin/dartutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698