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