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

Unified Diff: lib/compiler/implementation/universe.dart

Issue 10696194: Introduce CodeBuffer as StringBuffer replacement in compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 5 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: lib/compiler/implementation/universe.dart
diff --git a/lib/compiler/implementation/universe.dart b/lib/compiler/implementation/universe.dart
index c3b815d41b0cd5e035cab75149577b1635d368eb..55375270f1efd2d66f66996119457a2aeab59377 100644
--- a/lib/compiler/implementation/universe.dart
+++ b/lib/compiler/implementation/universe.dart
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
class Universe {
- Map<Element, CodeBlock> generatedCode;
- Map<Element, CodeBlock> generatedBailoutCode;
+ Map<Element, CodeBuffer> generatedCode;
+ Map<Element, CodeBuffer> generatedBailoutCode;
final Set<ClassElement> instantiatedClasses;
final Set<SourceString> instantiatedClassInstanceFields;
final Set<FunctionElement> staticFunctionsNeedingGetter;
@@ -17,8 +17,8 @@ class Universe {
final Set<Element> isChecks;
final RuntimeTypeInformation rti;
- Universe() : generatedCode = new Map<Element, CodeBlock>(),
- generatedBailoutCode = new Map<Element, CodeBlock>(),
+ Universe() : generatedCode = new Map<Element, CodeBuffer>(),
+ generatedBailoutCode = new Map<Element, CodeBuffer>(),
instantiatedClasses = new Set<ClassElement>(),
instantiatedClassInstanceFields = new Set<SourceString>(),
staticFunctionsNeedingGetter = new Set<FunctionElement>(),
@@ -30,12 +30,12 @@ class Universe {
isChecks = new Set<Element>(),
rti = new RuntimeTypeInformation();
- void addGeneratedCode(WorkItem work, CodeBlock codeBlock) {
- generatedCode[work.element] = codeBlock;
+ void addGeneratedCode(WorkItem work, CodeBuffer codeBuffer) {
+ generatedCode[work.element] = codeBuffer;
}
- void addBailoutCode(WorkItem work, CodeBlock codeBlock) {
- generatedBailoutCode[work.element] = codeBlock;
+ void addBailoutCode(WorkItem work, CodeBuffer codeBuffer) {
+ generatedBailoutCode[work.element] = codeBuffer;
}
bool hasMatchingSelector(Set<Selector> selectors,
@@ -352,9 +352,3 @@ class TypedSelector extends Selector {
return super == other;
}
}
-
-class CodeBlock {
- String code;
- List<SourceMappingEntry> sourceMappings;
- CodeBlock(this.code, this.sourceMappings);
-}
« lib/compiler/implementation/code_buffer.dart ('K') | « lib/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698