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

Side by Side Diff: runtime/vm/native_api_impl.cc

Issue 2327693002: Add --parse-all option in order to benchmark and measure the scanner/parser performance. (Closed)
Patch Set: Address review comments. Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "include/dart_native_api.h" 5 #include "include/dart_native_api.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_api_message.h" 9 #include "vm/dart_api_message.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 DARTSCOPE(Thread::Current()); 122 DARTSCOPE(Thread::Current());
123 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T); 123 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
124 if (::Dart_IsError(result)) { 124 if (::Dart_IsError(result)) {
125 return result; 125 return result;
126 } 126 }
127 CHECK_CALLBACK_STATE(T); 127 CHECK_CALLBACK_STATE(T);
128 CompileAll(T, &result); 128 CompileAll(T, &result);
129 return result; 129 return result;
130 } 130 }
131 131
132
133 static void ParseAll(Thread* thread, Dart_Handle* result) {
134 ASSERT(thread != NULL);
135 const Error& error = Error::Handle(thread->zone(),
136 Library::ParseAll(thread));
137 if (error.IsNull()) {
138 *result = Api::Success();
139 } else {
140 *result = Api::NewHandle(thread, error.raw());
141 }
142 }
143
144
145 DART_EXPORT Dart_Handle Dart_ParseAll() {
146 DARTSCOPE(Thread::Current());
147 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
148 if (::Dart_IsError(result)) {
149 return result;
150 }
151 CHECK_CALLBACK_STATE(T);
152 ParseAll(T, &result);
153 return result;
154 }
155
132 } // namespace dart 156 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698