OLD | NEW |
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 VM_BENCHMARK_TEST_H_ | 5 #ifndef VM_BENCHMARK_TEST_H_ |
6 #define VM_BENCHMARK_TEST_H_ | 6 #define VM_BENCHMARK_TEST_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 | 9 |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 // Accessors. | 52 // Accessors. |
53 const char* name() const { return name_; } | 53 const char* name() const { return name_; } |
54 void set_score(intptr_t value) { score_ = value; } | 54 void set_score(intptr_t value) { score_ = value; } |
55 intptr_t score() const { return score_; } | 55 intptr_t score() const { return score_; } |
56 Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); } | 56 Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); } |
57 | 57 |
58 Dart_Isolate CreateIsolate(uint8_t* buffer) { | 58 Dart_Isolate CreateIsolate(uint8_t* buffer) { |
59 char* err = NULL; | 59 char* err = NULL; |
60 isolate_ = Dart_CreateIsolate(NULL, buffer, NULL, &err); | 60 isolate_ = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err); |
61 EXPECT(isolate_ != NULL); | 61 EXPECT(isolate_ != NULL); |
62 free(err); | 62 free(err); |
63 return isolate_; | 63 return isolate_; |
64 } | 64 } |
65 | 65 |
66 void Run() { (*run_)(this); } | 66 void Run() { (*run_)(this); } |
67 void RunBenchmark(); | 67 void RunBenchmark(); |
68 | 68 |
69 static void RunAll(const char* executable); | 69 static void RunAll(const char* executable); |
70 static void SetExecutable(const char* arg) { executable_ = arg; } | 70 static void SetExecutable(const char* arg) { executable_ = arg; } |
(...skipping 30 matching lines...) Expand all Loading... |
101 | 101 |
102 private: | 102 private: |
103 Benchmark* benchmark_; | 103 Benchmark* benchmark_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); | 105 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace dart | 108 } // namespace dart |
109 | 109 |
110 #endif // VM_BENCHMARK_TEST_H_ | 110 #endif // VM_BENCHMARK_TEST_H_ |
OLD | NEW |