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

Side by Side Diff: tests/service_tests/performance/performance_service_impl.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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
(Empty)
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
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.md file.
4
5 import 'dart/performance_service.dart';
6
7 class PerformanceServiceImpl implements PerformanceService {
8 int echo(int n) => n;
9
10 int countTreeNodes(TreeNode node) {
11 int sum = 1;
12 List<TreeNode> children = node.children;
13 for (int i = 0; i < children.length; i++) {
14 sum += countTreeNodes(children[i]);
15 }
16 return sum;
17 }
18
19 void buildTree(int n, TreeNodeBuilder node) {
20 if (n > 1) {
21 List<TreeNodeBuilder> children = node.initChildren(2);
22 buildTree(n - 1, children[0]);
23 buildTree(n - 1, children[1]);
24 }
25 }
26 }
27
28 main() {
29 var impl = new PerformanceServiceImpl();
30 PerformanceService.initialize(impl);
31 while (PerformanceService.hasNextEvent()) {
32 PerformanceService.handleNextEvent();
33 }
34 }
OLDNEW
« no previous file with comments | « tests/service_tests/performance/performance_service.idl ('k') | tests/service_tests/performance/performance_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698