Skip to content

Commit

Permalink
Get rid of a lot of () for getters.
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Sep 7, 2012
1 parent 5c42dd9 commit 9beb871
Show file tree
Hide file tree
Showing 178 changed files with 4,009 additions and 4,009 deletions.
44 changes: 22 additions & 22 deletions lib/compiler/implementation/constant_system.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ interface BinaryOperation extends Operation {
* A [ConstantSystem] is responsible for creating constants and folding them.
*/
interface ConstantSystem {
BinaryOperation get add();
BinaryOperation get bitAnd();
UnaryOperation get bitNot();
BinaryOperation get bitOr();
BinaryOperation get bitXor();
BinaryOperation get booleanAnd();
BinaryOperation get booleanOr();
BinaryOperation get divide();
BinaryOperation get equal();
BinaryOperation get greaterEqual();
BinaryOperation get greater();
BinaryOperation get identity();
BinaryOperation get lessEqual();
BinaryOperation get less();
BinaryOperation get modulo();
BinaryOperation get multiply();
UnaryOperation get negate();
UnaryOperation get not();
BinaryOperation get shiftLeft();
BinaryOperation get shiftRight();
BinaryOperation get subtract();
BinaryOperation get truncatingDivide();
BinaryOperation get add;
BinaryOperation get bitAnd;
UnaryOperation get bitNot;
BinaryOperation get bitOr;
BinaryOperation get bitXor;
BinaryOperation get booleanAnd;
BinaryOperation get booleanOr;
BinaryOperation get divide;
BinaryOperation get equal;
BinaryOperation get greaterEqual;
BinaryOperation get greater;
BinaryOperation get identity;
BinaryOperation get lessEqual;
BinaryOperation get less;
BinaryOperation get modulo;
BinaryOperation get multiply;
UnaryOperation get negate;
UnaryOperation get not;
BinaryOperation get shiftLeft;
BinaryOperation get shiftRight;
BinaryOperation get subtract;
BinaryOperation get truncatingDivide;

Constant createInt(int i);
Constant createDouble(double d);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/implementation/js_backend/backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class JavaScriptBackend extends Backend {
argumentTypes = new ArgumentTypesRegistry(this);
}

Element get cyclicThrowHelper() {
Element get cyclicThrowHelper {
return compiler.findHelper(const SourceString("throwCyclicInit"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class JavaScriptBinaryBitOperation implements BinaryOperation {
const JavaScriptBinaryBitOperation(this.dartBitOperation);

bool isUserDefinable() => dartBitOperation.isUserDefinable();
SourceString get name() => dartBitOperation.name;
SourceString get name => dartBitOperation.name;

Constant fold(Constant left, Constant right) {
// In JavaScript we don't check for -0 and treat it as if it was zero.
Expand Down Expand Up @@ -76,7 +76,7 @@ class JavaScriptNegateOperation implements UnaryOperation {
const JavaScriptNegateOperation();

bool isUserDefinable() => dartNegateOperation.isUserDefinable();
SourceString get name() => dartNegateOperation.name;
SourceString get name => dartNegateOperation.name;

Constant fold(Constant constant) {
if (constant.isInt()) {
Expand All @@ -95,7 +95,7 @@ class JavaScriptBinaryArithmeticOperation implements BinaryOperation {
const JavaScriptBinaryArithmeticOperation(this.dartArithmeticOperation);

bool isUserDefinable() => dartArithmeticOperation.isUserDefinable();
SourceString get name() => dartArithmeticOperation.name;
SourceString get name => dartArithmeticOperation.name;

Constant fold(Constant left, Constant right) {
Constant result = dartArithmeticOperation.fold(left, right);
Expand All @@ -110,7 +110,7 @@ class JavaScriptIdentityOperation implements BinaryOperation {
const JavaScriptIdentityOperation();

bool isUserDefinable() => dartIdentityOperation.isUserDefinable();
SourceString get name() => dartIdentityOperation.name;
SourceString get name => dartIdentityOperation.name;

BoolConstant fold(Constant left, Constant right) {
BoolConstant result = dartIdentityOperation.fold(left, right);
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler/implementation/js_backend/emitter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CodeEmitterTask extends CompilerTask {
=> '${namer.ISOLATE}.${namer.ISOLATE_PROPERTIES}';
String get supportsProtoName
=> 'supportsProto';
String get lazyInitializerName()
String get lazyInitializerName
=> '${namer.ISOLATE}.\$lazy';

final String GETTER_SUFFIX = "?";
Expand Down Expand Up @@ -272,7 +272,7 @@ function(collectedClasses) {
}""";
}

String get lazyInitializerFunction() {
String get lazyInitializerFunction {
String isolate = namer.CURRENT_ISOLATE;
JavaScriptBackend backend = compiler.backend;
String cyclicThrow = namer.isolateAccess(backend.cyclicThrowHelper);
Expand Down
6 changes: 3 additions & 3 deletions lib/compiler/implementation/lib/coreimpl_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ patch class JSSyntaxRegExp {
return new _AllMatchesIterable(this, str);
}

patch String get pattern() => _pattern;
patch bool get multiLine() => _multiLine;
patch bool get ignoreCase() => _ignoreCase;
patch String get pattern => _pattern;
patch bool get multiLine => _multiLine;
patch bool get ignoreCase => _ignoreCase;

static JSSyntaxRegExp _globalVersionOf(JSSyntaxRegExp other) {
JSSyntaxRegExp re = new JSSyntaxRegExp(other.pattern,
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/implementation/lib/isolate_patch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class _IsolateEvent {

/** An interface for a stub used to interact with a manager. */
interface _ManagerStub {
get id();
get id;
void set id(int i);
void set onmessage(Function f);
void postMessage(msg);
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/implementation/resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ class CommonResolverVisitor<R> extends AbstractVisitor<R> {
}

interface LabelScope {
LabelScope get outer();
LabelScope get outer;
LabelElement lookup(String label);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/implementation/scanner/byte_strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ByteString implements SourceString {

ByteString(List<int> this.bytes, int this.offset, int this.length);

abstract String get charset();
abstract String get charset;

String slowToString() => new String.fromCharCodes(
new Utf8Decoder(bytes, offset, length).decodeRest());
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/implementation/scanner/token.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ interface SourceString extends Hashable, Iterable<int> default StringWrapper {
*/
SourceString copyWithoutQuotes(int initial, int terminal);

String get stringValue();
String get stringValue;

String slowToString();

Expand Down
6 changes: 3 additions & 3 deletions lib/compiler/implementation/ssa/nodes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2613,8 +2613,8 @@ class HBlockFlow {
* Information about a syntactic-like structure.
*/
interface HBlockInformation {
HBasicBlock get start();
HBasicBlock get end();
HBasicBlock get start;
HBasicBlock get end;
bool accept(HBlockInformationVisitor visitor);
}

Expand All @@ -2632,7 +2632,7 @@ interface HStatementInformation extends HBlockInformation {
*/
interface HExpressionInformation extends HBlockInformation {
bool accept(HExpressionInformationVisitor visitor);
HInstruction get conditionExpression();
HInstruction get conditionExpression;
}


Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/implementation/ssa/optimize.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

interface OptimizationPhase {
String get name();
String get name;
void visitGraph(HGraph graph);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/compiler/implementation/typechecker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class TypeCheckerTask extends CompilerTask {
}

abstract class DartType implements Hashable {
abstract SourceString get name();
abstract Element get element();
abstract SourceString get name;
abstract Element get element;

/**
* Returns the unaliased type of this type.
Expand Down
2 changes: 1 addition & 1 deletion lib/core/collection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ interface Collection<E> extends Iterable<E> {
/**
* Returns the number of elements in this collection.
*/
int get length();
int get length;
}
24 changes: 12 additions & 12 deletions lib/core/date.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ interface Date extends Comparable, Hashable default DateImplementation {
*
* Examples: [:"CET":] or [:"CEST":].
*/
String get timeZoneName();
String get timeZoneName;

/**
* The time-zone offset is the difference between local time and UTC. That is,
Expand All @@ -138,61 +138,61 @@ interface Date extends Comparable, Hashable default DateImplementation {
* local time. Java, C# and Ruby return the difference between local time and
* UTC.
*/
Duration get timeZoneOffset();
Duration get timeZoneOffset;

/**
* Returns the year.
*/
int get year();
int get year;

/**
* Returns the month into the year [1..12].
*/
int get month();
int get month;

/**
* Returns the day into the month [1..31].
*/
int get day();
int get day;

/**
* Returns the hour into the day [0..23].
*/
int get hour();
int get hour;

/**
* Returns the minute into the hour [0...59].
*/
int get minute();
int get minute;

/**
* Returns the second into the minute [0...59].
*/
int get second();
int get second;

/**
* Returns the millisecond into the second [0...999].
*/
int get millisecond();
int get millisecond;

/**
* Returns the week day [MON..SUN]. In accordance with ISO 8601
* a week starts with Monday which has the value 1.
*/
int get weekday();
int get weekday;

/**
* The milliseconds since 1970-01-01T00:00:00Z (UTC). This value is
* independent of the time zone.
*
* See [Stopwatch] for means to measure time-spans.
*/
int get millisecondsSinceEpoch();
int get millisecondsSinceEpoch;

/**
* True if this [Date] is set to UTC time.
*/
bool get isUtc();
bool get isUtc;

/**
* Returns a human readable string for this instance.
Expand Down
2 changes: 1 addition & 1 deletion lib/core/exceptions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class NullPointerException implements Exception {
}
}

String get exceptionName() => "NullPointerException";
String get exceptionName => "NullPointerException";

final String functionName;
final List arguments;
Expand Down
12 changes: 6 additions & 6 deletions lib/core/future.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,34 @@ interface Future<T> default FutureImpl<T> {
Future.immediate(T value);

/** The value provided. Throws an exception if [hasValue] is false. */
T get value();
T get value;

/**
* Exception that occurred ([:null:] if no exception occured). This property
* throws a [FutureNotCompleteException] if it is used before this future is
* completes.
*/
Object get exception();
Object get exception;

/**
* The stack trace object associated with the exception that occurred. This
* throws a [FutureNotCompleteException] if it is used before the future
* completes. Returns [:null:] if the future completed successfully or a
* stack trace wasn't provided with the exception when it occurred.
*/
Object get stackTrace();
Object get stackTrace;

/**
* Whether the future is complete (either the value is available or there was
* an exception).
*/
bool get isComplete();
bool get isComplete;

/**
* Whether the value is available (meaning [isComplete] is true, and there was
* no exception).
*/
bool get hasValue();
bool get hasValue;

/**
* When this future is complete (either with a value or with an exception),
Expand Down Expand Up @@ -163,7 +163,7 @@ interface Completer<T> default CompleterImpl<T> {
Completer();

/** The future that will contain the value produced by this completer. */
Future get future();
Future get future;

/** Supply a value for [future]. */
void complete(T value);
Expand Down
2 changes: 1 addition & 1 deletion lib/core/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ interface Map<K, V> default HashMapImplementation<K extends Hashable, V> {
/**
* The number of {key, value} pairs in the map.
*/
int get length();
int get length;

/**
* Returns true if there is no {key, value} pair in the map.
Expand Down
6 changes: 3 additions & 3 deletions lib/core/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface Options default RuntimeOptions {
* If the execution environment does not support [arguments] an empty list
* is returned.
*/
List<String> get arguments();
List<String> get arguments;

/**
* Returns the path of the executable used to run the script in this
Expand All @@ -32,13 +32,13 @@ interface Options default RuntimeOptions {
* If the execution environment does not support [executable] an empty
* string is returned.
*/
String get executable();
String get executable;

/**
* Returns the path of the script being run in this isolate.
*
* If the executable environment does not support [script] an empty
* string is returned.
*/
String get script();
String get script;
}
2 changes: 1 addition & 1 deletion lib/core/string.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface String
/**
* The length of the string.
*/
int get length();
int get length;

/**
* Returns whether the two strings are equal. This method compares
Expand Down
Loading

0 comments on commit 9beb871

Please sign in to comment.