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

Issue 1331623002: Uses SNPRINT macro where possible. Otherwise uses #define for format. (Closed)

Created:
5 years, 3 months ago by zra
Modified:
5 years, 3 months ago
Reviewers:
Cutch, siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Uses SNPRINT macro where possible. Otherwise uses #define for format. I was able to convert 49 SNPrint(NULL, 0, ...) patterns to use the macro. I had to use a #define for the format string 5 times due to uses that didn't fit the macro. 2 occurences of SNPrint(NULL, 0, ...) had >=2 possibilities for the format string based on runtime values, and I didn't try to convert them. Fixed ~10 format strings. BUG= R=iposva@google.com Committed: https://github.com/dart-lang/sdk/commit/16393ee9c6cfcda036ce32f4fb1c029f3cadc906

Patch Set 1 #

Total comments: 1

Patch Set 2 : Format string fixes #

Total comments: 6

Patch Set 3 : Replace SNPRINT with OS::SNCreate" #

Patch Set 4 : Add back assembler functions #

Total comments: 5

Patch Set 5 : Rename SCreate, add VSCreate, base zone functions on these #

Patch Set 6 : #

Patch Set 7 : add missing include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -309 lines) Patch
M runtime/vm/benchmark_test.cc View 1 2 3 4 1 chunk +2 lines, -6 lines 0 comments Download
M runtime/vm/coverage.cc View 1 2 3 4 1 chunk +3 lines, -6 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 4 1 chunk +2 lines, -10 lines 0 comments Download
M runtime/vm/disassembler_ia32.cc View 1 2 3 4 1 chunk +2 lines, -5 lines 0 comments Download
M runtime/vm/disassembler_x64.cc View 1 2 3 4 1 chunk +2 lines, -5 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 41 chunks +89 lines, -201 lines 0 comments Download
M runtime/vm/os.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/os_android.cc View 1 2 3 4 4 chunks +40 lines, -13 lines 0 comments Download
M runtime/vm/os_linux.cc View 1 2 3 4 5 chunks +41 lines, -19 lines 0 comments Download
M runtime/vm/os_macos.cc View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download
M runtime/vm/os_win.cc View 1 2 3 4 5 6 2 chunks +34 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 2 3 4 2 chunks +7 lines, -11 lines 0 comments Download
M runtime/vm/stack_frame_test.cc View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
M runtime/vm/timeline.cc View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
M runtime/vm/version_in.cc View 1 2 3 4 1 chunk +1 line, -6 lines 0 comments Download
M runtime/vm/zone.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M runtime/vm/zone.cc View 1 2 3 4 1 chunk +4 lines, -14 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
zra
https://codereview.chromium.org/1331623002/diff/1/runtime/vm/assembler.cc File runtime/vm/assembler.cc (left): https://codereview.chromium.org/1331623002/diff/1/runtime/vm/assembler.cc#oldcode184 runtime/vm/assembler.cc:184: // Shared macros are implemented here. These weren't used, ...
5 years, 3 months ago (2015-09-08 21:09:24 UTC) #2
Ivan Posva
LGTMwC and the Unimplemented (and friends) added back as discussed. We should deal with the ...
5 years, 3 months ago (2015-09-09 16:30:36 UTC) #3
siva
DBC Instead of having a macro SNPRINT why not change the signature of OS::SNPrint to ...
5 years, 3 months ago (2015-09-09 16:46:21 UTC) #5
siva
Sorry I meant OS::SNPrint(Zone* zone, const char* format, ...);
5 years, 3 months ago (2015-09-09 16:50:16 UTC) #6
zra
Added back assembler functions and added a call OS::SNCreate to do what Siva suggested. https://codereview.chromium.org/1331623002/diff/20001/runtime/vm/object.cc ...
5 years, 3 months ago (2015-09-09 18:40:13 UTC) #7
Ivan Posva
LGTM I do like the fact that we were able to get rid of the ...
5 years, 3 months ago (2015-09-10 17:59:07 UTC) #8
Cutch
DBC- https://codereview.chromium.org/1331623002/diff/60001/runtime/vm/os_android.cc File runtime/vm/os_android.cc (right): https://codereview.chromium.org/1331623002/diff/60001/runtime/vm/os_android.cc#newcode354 runtime/vm/os_android.cc:354: buffer = zone->Alloc<char>(len + 1); Note that Zone ...
5 years, 3 months ago (2015-09-10 18:01:04 UTC) #10
Ivan Posva
-Ivan https://codereview.chromium.org/1331623002/diff/60001/runtime/vm/os_android.cc File runtime/vm/os_android.cc (right): https://codereview.chromium.org/1331623002/diff/60001/runtime/vm/os_android.cc#newcode342 runtime/vm/os_android.cc:342: char* OS::SNCreate(Zone* zone, const char* format, ...) { ...
5 years, 3 months ago (2015-09-10 18:08:11 UTC) #11
zra
https://codereview.chromium.org/1331623002/diff/60001/runtime/vm/os_android.cc File runtime/vm/os_android.cc (right): https://codereview.chromium.org/1331623002/diff/60001/runtime/vm/os_android.cc#newcode342 runtime/vm/os_android.cc:342: char* OS::SNCreate(Zone* zone, const char* format, ...) { On ...
5 years, 3 months ago (2015-09-10 21:58:38 UTC) #12
Ivan Posva
Still LGTM. -Ivan
5 years, 3 months ago (2015-09-10 22:49:03 UTC) #13
zra
5 years, 3 months ago (2015-09-11 07:18:20 UTC) #14
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
16393ee9c6cfcda036ce32f4fb1c029f3cadc906 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698