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

Issue 9414005: Fix issue 979: operator arity must be verified. (Closed)

Created:
8 years, 10 months ago by srdjan
Modified:
8 years, 10 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fix issue 979: operator arity must be verified. Committed: https://code.google.com/p/dart/source/detail?r=4401

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -28 lines) Patch
M runtime/vm/parser.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 36 chunks +60 lines, -1 line 0 comments Download
M tests/co19/co19-runtime.status View 1 1 chunk +1 line, -27 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
srdjan
8 years, 10 months ago (2012-02-16 12:21:40 UTC) #1
hausner
Technically LGTM but I have a suggestion how to do this less heavy-handedly. See below. ...
8 years, 10 months ago (2012-02-16 17:39:36 UTC) #2
srdjan
8 years, 10 months ago (2012-02-21 17:20:08 UTC) #3
On 2012/02/16 17:39:36, hausner wrote:
> Technically LGTM but I have a suggestion how to do this less heavy-handedly.
See
> below.
> 
> https://chromiumcodereview.appspot.com/9414005/diff/1/runtime/vm/parser.cc
> File runtime/vm/parser.cc (right):
> 
>
https://chromiumcodereview.appspot.com/9414005/diff/1/runtime/vm/parser.cc#ne...
> runtime/vm/parser.cc:2478: CheckOperatorArity(member);
> Suggestion. I think this is unnecessarily complicated. In CheckOperatorArity
you
> have to create several handles and do string compares to figure out which
> operator we're dealing with and what the expected arity is.
> 
> Instead, you could remember the operator token a few lines above and pass it
to
> CheckOperatorArity(). You also don't need the is_operator field in MemberDesc.
A
> local boolean variable here would be enough to remember that you need to call
> CheckOperatorArity.

Changed as suggested.

Powered by Google App Engine
This is Rietveld 408576698