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

Side by Side Diff: runtime/vm/benchmark_test.h

Issue 1130753006: Hide Isolate pointer from embedder (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/custom_isolate_test.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 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"
11 #include "vm/dart_api_impl.h"
11 #include "vm/globals.h" 12 #include "vm/globals.h"
12 #include "vm/heap.h" 13 #include "vm/heap.h"
13 #include "vm/isolate.h" 14 #include "vm/isolate.h"
14 #include "vm/object.h" 15 #include "vm/object.h"
15 #include "vm/zone.h" 16 #include "vm/zone.h"
16 17
17 namespace dart { 18 namespace dart {
18 19
19 DECLARE_FLAG(int, code_heap_size); 20 DECLARE_FLAG(int, code_heap_size);
20 DECLARE_FLAG(int, old_gen_growth_space_ratio); 21 DECLARE_FLAG(int, old_gen_growth_space_ratio);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 tail_->next_ = this; 71 tail_->next_ = this;
71 } 72 }
72 tail_ = this; 73 tail_ = this;
73 } 74 }
74 75
75 // Accessors. 76 // Accessors.
76 const char* name() const { return name_; } 77 const char* name() const { return name_; }
77 const char* score_kind() const { return score_kind_; } 78 const char* score_kind() const { return score_kind_; }
78 void set_score(int64_t value) { score_ = value; } 79 void set_score(int64_t value) { score_ = value; }
79 int64_t score() const { return score_; } 80 int64_t score() const { return score_; }
80 Isolate* isolate() const { return reinterpret_cast<Isolate*>(isolate_); } 81 Isolate* isolate() const { return Api::CastIsolate(isolate_); }
81 82
82 Dart_Isolate CreateIsolate(const uint8_t* buffer) { 83 Dart_Isolate CreateIsolate(const uint8_t* buffer) {
83 char* err = NULL; 84 char* err = NULL;
84 isolate_ = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err); 85 isolate_ = Dart_CreateIsolate(NULL, NULL, buffer, NULL, &err);
85 EXPECT(isolate_ != NULL); 86 EXPECT(isolate_ != DART_ILLEGAL_ISOLATE);
86 free(err); 87 free(err);
87 return isolate_; 88 return isolate_;
88 } 89 }
89 90
90 void Run() { (*run_)(this); } 91 void Run() { (*run_)(this); }
91 void RunBenchmark(); 92 void RunBenchmark();
92 93
93 static void RunAll(const char* executable); 94 static void RunAll(const char* executable);
94 static void SetExecutable(const char* arg) { executable_ = arg; } 95 static void SetExecutable(const char* arg) { executable_ = arg; }
95 static const char* Executable() { return executable_; } 96 static const char* Executable() { return executable_; }
(...skipping 30 matching lines...) Expand all
126 127
127 private: 128 private:
128 Benchmark* benchmark_; 129 Benchmark* benchmark_;
129 130
130 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope); 131 DISALLOW_COPY_AND_ASSIGN(BenchmarkIsolateScope);
131 }; 132 };
132 133
133 } // namespace dart 134 } // namespace dart
134 135
135 #endif // VM_BENCHMARK_TEST_H_ 136 #endif // VM_BENCHMARK_TEST_H_
OLDNEW
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/custom_isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698