Skip to content

Commit 6cd8a79

Browse files
committed
VM: Re-format to use at most one newline between functions
[email protected] Review-Url: https://codereview.chromium.org/2974233002 .
1 parent 6dbcd67 commit 6cd8a79

File tree

665 files changed

+517
-19089
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

665 files changed

+517
-19089
lines changed

.clang-format

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
33
BasedOnStyle: Chromium
44

5-
# Keep up to 2 blank lines. More blank lines are removed.
6-
MaxEmptyLinesToKeep: 2
7-
85
# clang-format doesn't seem to do a good job of this for longer comments.
96
ReflowComments: 'false'
107

runtime/bin/builtin.cc

-7
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ static void LoadPatchFiles(Dart_Handle library,
6363
}
6464
}
6565

66-
6766
Dart_Handle Builtin::Source(BuiltinLibraryId id) {
6867
ASSERT(static_cast<int>(id) >= 0);
6968
ASSERT(static_cast<int>(id) < num_libs_);
@@ -74,7 +73,6 @@ Dart_Handle Builtin::Source(BuiltinLibraryId id) {
7473
return GetSource(source_paths, uri);
7574
}
7675

77-
7876
Dart_Handle Builtin::PartSource(BuiltinLibraryId id, const char* part_uri) {
7977
ASSERT(static_cast<int>(id) >= 0);
8078
ASSERT(static_cast<int>(id) < num_libs_);
@@ -84,7 +82,6 @@ Dart_Handle Builtin::PartSource(BuiltinLibraryId id, const char* part_uri) {
8482
return GetSource(source_paths, part_uri);
8583
}
8684

87-
8885
Dart_Handle Builtin::GetSource(const char** source_paths, const char* uri) {
8986
if (source_paths == NULL) {
9087
return Dart_Null(); // No path mapping information exists for library.
@@ -100,7 +97,6 @@ Dart_Handle Builtin::GetSource(const char** source_paths, const char* uri) {
10097
return Dart_Null(); // Uri does not exist in path mapping information.
10198
}
10299

103-
104100
void Builtin::SetNativeResolver(BuiltinLibraryId id) {
105101
ASSERT(static_cast<int>(id) >= 0);
106102
ASSERT(static_cast<int>(id) < num_libs_);
@@ -115,7 +111,6 @@ void Builtin::SetNativeResolver(BuiltinLibraryId id) {
115111
}
116112
}
117113

118-
119114
Dart_Handle Builtin::LoadLibrary(Dart_Handle url, BuiltinLibraryId id) {
120115
ASSERT(static_cast<int>(id) >= 0);
121116
ASSERT(static_cast<int>(id) < num_libs_);
@@ -134,7 +129,6 @@ Dart_Handle Builtin::LoadLibrary(Dart_Handle url, BuiltinLibraryId id) {
134129
return library;
135130
}
136131

137-
138132
Builtin::BuiltinLibraryId Builtin::FindId(const char* url_string) {
139133
int id = 0;
140134
while (true) {
@@ -148,7 +142,6 @@ Builtin::BuiltinLibraryId Builtin::FindId(const char* url_string) {
148142
}
149143
}
150144

151-
152145
Dart_Handle Builtin::LoadAndCheckLibrary(BuiltinLibraryId id) {
153146
ASSERT(static_cast<int>(id) >= 0);
154147
ASSERT(static_cast<int>(id) < num_libs_);

runtime/bin/builtin.h

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ namespace bin {
2121
#define DECLARE_FUNCTION(name, count) \
2222
extern void FUNCTION_NAME(name)(Dart_NativeArguments args);
2323

24-
2524
class Builtin {
2625
public:
2726
// Note: Changes to this enum should be accompanied with changes to

runtime/bin/builtin_gen_snapshot.cc

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
#include <stdlib.h>
65
#include <stdio.h>
6+
#include <stdlib.h>
77
#include <string.h>
88

99
#include "include/dart_api.h"
@@ -25,7 +25,6 @@ static struct NativeEntries {
2525
int argument_count_;
2626
} BuiltinEntries[] = {BUILTIN_NATIVE_LIST(REGISTER_FUNCTION)};
2727

28-
2928
Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
3029
int argument_count,
3130
bool* auto_setup_scope) {
@@ -46,7 +45,6 @@ Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
4645
return IONativeLookup(name, argument_count, auto_setup_scope);
4746
}
4847

49-
5048
const uint8_t* Builtin::NativeSymbol(Dart_NativeFunction nf) {
5149
int num_entries = sizeof(BuiltinEntries) / sizeof(struct NativeEntries);
5250
for (int i = 0; i < num_entries; i++) {
@@ -58,7 +56,6 @@ const uint8_t* Builtin::NativeSymbol(Dart_NativeFunction nf) {
5856
return IONativeSymbol(nf);
5957
}
6058

61-
6259
// Implementation of native functions which are used for some
6360
// test/debug functionality in standalone dart mode.
6461
void FUNCTION_NAME(Builtin_PrintString)(Dart_NativeArguments args) {

runtime/bin/builtin_natives.cc

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
#include <stdlib.h>
65
#include <stdio.h>
6+
#include <stdlib.h>
77
#include <string.h>
88

99
#include "include/dart_api.h"
@@ -29,7 +29,6 @@ namespace bin {
2929
V(Builtin_PrintString, 1) \
3030
V(Builtin_GetCurrentDirectory, 0)
3131

32-
3332
BUILTIN_NATIVE_LIST(DECLARE_FUNCTION);
3433

3534
static struct NativeEntries {
@@ -38,12 +37,10 @@ static struct NativeEntries {
3837
int argument_count_;
3938
} BuiltinEntries[] = {BUILTIN_NATIVE_LIST(REGISTER_FUNCTION)};
4039

41-
4240
void Builtin_DummyNative(Dart_NativeArguments args) {
4341
UNREACHABLE();
4442
}
4543

46-
4744
/**
4845
* Looks up native functions in both libdart_builtin and libdart_io.
4946
*/
@@ -72,7 +69,6 @@ Dart_NativeFunction Builtin::NativeLookup(Dart_Handle name,
7269
return result;
7370
}
7471

75-
7672
const uint8_t* Builtin::NativeSymbol(Dart_NativeFunction nf) {
7773
int num_entries = sizeof(BuiltinEntries) / sizeof(struct NativeEntries);
7874
for (int i = 0; i < num_entries; i++) {
@@ -84,7 +80,6 @@ const uint8_t* Builtin::NativeSymbol(Dart_NativeFunction nf) {
8480
return IONativeSymbol(nf);
8581
}
8682

87-
8883
// Implementation of native functions which are used for some
8984
// test/debug functionality in standalone dart mode.
9085
void FUNCTION_NAME(Builtin_PrintString)(Dart_NativeArguments args) {

runtime/bin/builtin_nolib.cc

-7
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,20 @@ Dart_Port Builtin::load_port_ = ILLEGAL_PORT;
2525
const int Builtin::num_libs_ =
2626
sizeof(Builtin::builtin_libraries_) / sizeof(Builtin::builtin_lib_props);
2727

28-
2928
Dart_Handle Builtin::Source(BuiltinLibraryId id) {
3029
return DartUtils::NewError("Unreachable code in Builtin::Source (%d).", id);
3130
}
3231

33-
3432
Dart_Handle Builtin::PartSource(BuiltinLibraryId id, const char* uri) {
3533
return DartUtils::NewError("Unreachable code in Builtin::PartSource (%d).",
3634
id);
3735
}
3836

39-
4037
Dart_Handle Builtin::GetSource(const char** source_paths, const char* uri) {
4138
return DartUtils::NewError("Unreachable code in Builtin::GetSource (%s).",
4239
uri);
4340
}
4441

45-
4642
void Builtin::SetNativeResolver(BuiltinLibraryId id) {
4743
ASSERT(static_cast<int>(id) >= 0);
4844
ASSERT(static_cast<int>(id) < num_libs_);
@@ -57,18 +53,15 @@ void Builtin::SetNativeResolver(BuiltinLibraryId id) {
5753
}
5854
}
5955

60-
6156
Dart_Handle Builtin::LoadLibrary(Dart_Handle url, BuiltinLibraryId id) {
6257
return DartUtils::NewError("Unreachable code in Builtin::LoadLibrary (%d).",
6358
id);
6459
}
6560

66-
6761
Builtin::BuiltinLibraryId Builtin::FindId(const char* url_string) {
6862
return kInvalidLibrary;
6963
}
7064

71-
7265
Dart_Handle Builtin::LoadAndCheckLibrary(BuiltinLibraryId id) {
7366
ASSERT(static_cast<int>(id) >= 0);
7467
ASSERT(static_cast<int>(id) < num_libs_);

0 commit comments

Comments
 (0)