Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(15475)

Issue 13239046: Eliminate bitfield enum members. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by nicolas
Modified:
10 years, 6 months ago
CC:
angleproject-review_googlegroups.com
Base URL:
https://code.google.com/p/angleproject@master
Visibility:
Public.

Description

Eliminate bitfield enum members. BUG=448

Patch Set 1 #

Total comments: 2

Patch Set 2 : Eliminate bitfield enum members. Using unsigned char. #

Patch Set 3 : Eliminate bitfield enum members. Using unsigned char. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -10 lines) Patch
M src/compiler/Types.h View 1 2 6 chunks +10 lines, -10 lines 1 comment Download

Messages

Total messages: 8
Zhenyao Mo
LGTM Tried on my linux, which failed with the reverted commit and worked OK with ...
10 years, 7 months ago (2013-08-29 00:33:57 UTC) #1
Alok Priyadarshi
https://codereview.appspot.com/13239046/diff/1/src/compiler/Types.h File src/compiler/Types.h (right): https://codereview.appspot.com/13239046/diff/1/src/compiler/Types.h#newcode240 src/compiler/Types.h:240: char size; can we use a portable version of ...
10 years, 7 months ago (2013-08-29 05:19:53 UTC) #2
nicolas
On 2013/08/29 05:19:53, Alok Priyadarshi wrote: > https://codereview.appspot.com/13239046/diff/1/src/compiler/Types.h > File src/compiler/Types.h (right): > > https://codereview.appspot.com/13239046/diff/1/src/compiler/Types.h#newcode240 ...
10 years, 7 months ago (2013-09-09 15:16:56 UTC) #3
Alok Priyadarshi
unsigned char would be fine too.
10 years, 7 months ago (2013-09-09 16:46:37 UTC) #4
nicolas
On 2013/09/09 16:46:37, Alok Priyadarshi wrote: > unsigned char would be fine too. PTAL
10 years, 6 months ago (2013-09-25 18:53:22 UTC) #5
Alok Priyadarshi
lgtm https://codereview.appspot.com/13239046/diff/9001/src/compiler/Types.h File src/compiler/Types.h (right): https://codereview.appspot.com/13239046/diff/9001/src/compiler/Types.h#newcode118 src/compiler/Types.h:118: int getNominalSize() const { return size; } is ...
10 years, 6 months ago (2013-09-25 21:51:39 UTC) #6
Geoff Lang
LGTM
10 years, 6 months ago (2013-10-01 14:26:31 UTC) #7
nicolas
10 years, 6 months ago (2013-10-02 19:57:07 UTC) #8
On 2013/09/25 21:51:39, Alok Priyadarshi wrote:
> lgtm
> 
> https://codereview.appspot.com/13239046/diff/9001/src/compiler/Types.h
> File src/compiler/Types.h (right):
> 
>
https://codereview.appspot.com/13239046/diff/9001/src/compiler/Types.h#newcod...
> src/compiler/Types.h:118: int getNominalSize() const { return size; }
> is there any problem with returning "unsigned char" from here?

No specific problem but any use of these values in other calculations quickly
leads to implicitly expanding them to 32-bit. When returning an unsigned char it
really returns a 32-bit register already so we might as well do this expansion
very early on. It also avoids a change in the interface of the class in case the
wrong header is used.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b