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

Side by Side Diff: src/compiler/STYLE

Issue 865183002: [turbofan] Add STYLE document. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Compiler Coding Style
2 =====================
3
4 Coding style for the TurboFan compiler generally follows the Google C++ Style
5 Guide and the Chromium Coding Style. The notes below are usually just extensions
6 beyond what the Google style guide already says. If this document doesn't
7 mention a rule, follow the Google C++ style.
8
9
10 TODOs
11 -----
12 We use the following convention for putting TODOs into the code:
13
14 * A TODO(turbofan) implies a performance improvement opportunity.
15 * A TODO(name) implies an incomplete implementation.
16
17
18 Use of C++11 auto keyword
19 -------------------------
20 Use auto to avoid type names that are just clutter. Continue to use manifest
21 type declarations when it helps readability, and never use auto for anything
22 but local variables, in particular auto should only be used where it is obvious
23 from context what the type is:
24
25 for (auto block : x->blocks()) // clearly a Block of some kind
26 for (auto instr : x->instructions()) // clearly an Instruction of some kind
27
28 for (auto b : x->predecessors()) // less clear, better to make it explicit
29 for (BasicBlock* b : x->predecessors()) // now clear
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698