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

Issue 11779018: Fix Intrinsifier and MethodRecognizer to correctly match private getters and setters. (Closed)

Created:
7 years, 11 months ago by Vyacheslav Egorov (Google)
Modified:
7 years, 11 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix Intrinsifier and MethodRecognizer to correctly match private getters and setters. R=fschneider@google.com Committed: https://code.google.com/p/dart/source/detail?r=16701

Patch Set 1 #

Total comments: 11

Patch Set 2 : Address Florian's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -24 lines) Patch
M runtime/vm/intermediate_language.cc View 1 2 chunks +44 lines, -5 lines 0 comments Download
M runtime/vm/intrinsifier.cc View 1 1 chunk +42 lines, -19 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vyacheslav Egorov (Google)
7 years, 11 months ago (2013-01-07 12:39:02 UTC) #1
Florian Schneider
LGTM with comments https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_language.cc#newcode220 runtime/vm/intermediate_language.cc:220: static bool StartsWith(const String& name, const ...
7 years, 11 months ago (2013-01-07 13:15:48 UTC) #2
Kevin Millikin (Google)
DBC :) https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_language.cc#newcode238 runtime/vm/intermediate_language.cc:238: static const intptr_t kPrefixLength = 5; On ...
7 years, 11 months ago (2013-01-07 13:26:36 UTC) #3
Kevin Millikin (Google)
On 2013/01/07 13:26:36, kmillikin wrote: > DBC :) > > https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_language.cc > File runtime/vm/intermediate_language.cc (right): ...
7 years, 11 months ago (2013-01-07 13:27:24 UTC) #4
Vyacheslav Egorov (Google)
7 years, 11 months ago (2013-01-07 15:02:47 UTC) #5
Message was sent while issue was closed.
landed. thanks

https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_langu...
File runtime/vm/intermediate_language.cc (right):

https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.cc:220: static bool StartsWith(const String&
name, const char* prefix, intptr_t n) {
On 2013/01/07 13:15:48, Florian Schneider wrote:
> Maybe assert that name is a OneByteString?

Done.

https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.cc:238: static const intptr_t kPrefixLength =
5;
On 2013/01/07 13:15:48, Florian Schneider wrote:
> Do you really need static here? I'd omit it for local variables.

Done.

https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.cc:238: static const intptr_t kPrefixLength =
5;
On 2013/01/07 13:15:48, Florian Schneider wrote:
> Maybe rather use strlen(kPrefixGetter) and strlen(kPrefixSetter) below? 

Done.

https://codereview.chromium.org/11779018/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.cc:239: static const char* kGetterPrefix =
"get:_";
On 2013/01/07 13:15:48, Florian Schneider wrote:
> We have already kGetterPrefix in object.cc. Maybe define this one too in the
> same place and rename it to kPrivateGetterPrefix.

Done.

https://codereview.chromium.org/11779018/diff/1/runtime/vm/intrinsifier.cc
File runtime/vm/intrinsifier.cc (right):

https://codereview.chromium.org/11779018/diff/1/runtime/vm/intrinsifier.cc#ne...
runtime/vm/intrinsifier.cc:18: static const char* kSetterPrefix = "set:_";
On 2013/01/07 13:15:48, Florian Schneider wrote:
> I'd define those in one place and remove kPrefixLength in favor of
strlen(...).

I renamed & started to use strlen. 

I am however going to keep it here. Later we will refactor method recognizer and
intrinsifier to use the same code.

Powered by Google App Engine
This is Rietveld 408576698