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

Side by Side Diff: runtime/vm/version_in.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/verifier.cc ('k') | runtime/vm/virtual_memory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/version.h" 5 #include "vm/version.h"
6 6
7 #include "vm/cpu.h" 7 #include "vm/cpu.h"
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 // TODO(iposva): Avoid racy initialization. 12 // TODO(iposva): Avoid racy initialization.
13 static const char* formatted_version = NULL; 13 static const char* formatted_version = NULL;
14 14
15 const char* Version::String() { 15 const char* Version::String() {
16 if (formatted_version == NULL) { 16 if (formatted_version == NULL) {
17 const char* os = OS::Name(); 17 const char* os = OS::Name();
18 const char* arch = CPU::Id(); 18 const char* arch = CPU::Id();
19 formatted_version = OS::SCreate(NULL, "%s on \"%s_%s\"", str_, os, arch); 19 formatted_version = OS::SCreate(NULL, "%s on \"%s_%s\"", str_, os, arch);
20 } 20 }
21 return formatted_version; 21 return formatted_version;
22 } 22 }
23 23
24
25 const char* Version::SnapshotString() { 24 const char* Version::SnapshotString() {
26 return snapshot_hash_; 25 return snapshot_hash_;
27 } 26 }
28 27
29
30 const char* Version::CommitString() { 28 const char* Version::CommitString() {
31 return commit_; 29 return commit_;
32 } 30 }
33 31
34 const char* Version::snapshot_hash_ = "{{SNAPSHOT_HASH}}"; 32 const char* Version::snapshot_hash_ = "{{SNAPSHOT_HASH}}";
35 const char* Version::str_ = "{{VERSION_STR}} ({{BUILD_TIME}})"; 33 const char* Version::str_ = "{{VERSION_STR}} ({{BUILD_TIME}})";
36 const char* Version::commit_ = "{{VERSION_STR}}"; 34 const char* Version::commit_ = "{{VERSION_STR}}";
37 35
38 } // namespace dart 36 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/verifier.cc ('k') | runtime/vm/virtual_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698