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

Unified Diff: tools/servicec/lib/src/resources/java/dartino/BuilderSegment.java

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 side-by-side diff with in-line comments
Download patch
Index: tools/servicec/lib/src/resources/java/dartino/BuilderSegment.java
diff --git a/tools/servicec/lib/src/resources/java/dartino/BuilderSegment.java b/tools/servicec/lib/src/resources/java/dartino/BuilderSegment.java
deleted file mode 100644
index e5f91f71fd2020dccc03b35f4a00adbf4f12487f..0000000000000000000000000000000000000000
--- a/tools/servicec/lib/src/resources/java/dartino/BuilderSegment.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-package dartino;
-
-class BuilderSegment extends Segment {
- public BuilderSegment(MessageBuilder builder, int id, int size) {
- super(new byte[size]);
- this.builder = builder;
- this.id = id;
- used = 0;
- }
-
- public boolean hasSpaceForBytes(int bytes) {
- return used + bytes < buffer().capacity();
- }
-
- public int allocate(int bytes) {
- if (!hasSpaceForBytes(bytes)) return -1;
- int result = used;
- used += bytes;
- return result;
- }
-
- public int id() { return id; }
- public int used() { return used; }
- public MessageBuilder builder() { return builder; }
-
- public boolean hasNext() { return next != null; }
- public BuilderSegment next() { return next; }
- public void setNext(BuilderSegment segment) { next = segment; }
-
- private MessageBuilder builder;
- private int id;
- private BuilderSegment next;
- private int used;
-}

Powered by Google App Engine
This is Rietveld 408576698