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

Issue 6009005: Support load function prototype in hydrogen/lithium. (Closed)

Created:
10 years ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Support load function prototype in hydrogen/lithium.

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -1 line) Patch
M src/ast.h View 3 chunks +4 lines, -0 lines 0 comments Download
M src/ast.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.h View 5 chunks +25 lines, -1 line 9 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 chunk +44 lines, -0 lines 2 comments Download
M src/ia32/lithium-ia32.h View 3 chunks +18 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Vitaly Repeshko
10 years ago (2010-12-21 16:39:16 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h#newcode2640 src/hydrogen-instructions.h:2640: virtual bool DataEquals(HValue* other) const { return true; ...
10 years ago (2010-12-21 17:57:52 UTC) #2
Vitaly Repeshko
Thanks! -- Vitaly http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h#newcode2640 src/hydrogen-instructions.h:2640: virtual bool DataEquals(HValue* other) const { ...
10 years ago (2010-12-22 15:43:41 UTC) #3
Kevin Millikin (Chromium)
This change is fishy (sorry I didn't see it before). I will fix it. http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h ...
9 years, 11 months ago (2011-01-26 11:54:00 UTC) #4
Vitaly Repeshko
9 years, 11 months ago (2011-01-26 14:06:23 UTC) #5
Thanks for having a look.


-- Vitaly

http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h
File src/hydrogen-instructions.h (right):

http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h#new...
src/hydrogen-instructions.h:135: //       HLoadFunctionPrototype
On 2011/01/26 11:54:00, Kevin Millikin wrote:
> These are intended to be alphabetized.

Actually do we need this comment at all? It's a PITA to update it and nothing
enforces that what it says is correct.

http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h#new...
src/hydrogen-instructions.h:2628: SetFlagMask(kDependsOnFunctionPrototypes);
On 2011/01/26 11:54:00, Kevin Millikin wrote:
> 1. Don't introduce a new kDependsOn... flag if there is nothing that
> specifically kChanges... it (there are only so many bits for these flags).  We
> use kDependsOnCalls for this case.

There's DependsOnMaps and no ChangesMaps. We actually discussed this with
Florian and decided it's nice to have a more precise dependency in general.

> 2. SetFlagMask takes a flag mask (something like binary ...00001000, ie, a
> shifted flag) not a flag (something like decimal 3).  You want SetFlag here. 
> It's error prone and we should change it, but in the meantime we need to be
> careful.

Oops, I totally messed the flags here...

http://codereview.chromium.org/6009005/diff/1/src/hydrogen-instructions.h#new...
src/hydrogen-instructions.h:2640: virtual bool DataEquals(HValue* other) const {
return true; }
On 2011/01/26 11:54:00, Kevin Millikin wrote:
> 1. It's not required unless the instruction has kUseGVN.  I think you intend
> this one to be GVN-able, so you should set that flag.

Yeah, see above.

> 2. I think it's a bit error prone to copy the default implementation instead
of
> inheriting the default implementation when what you want is the default
> implementation.  If we change the default for some reason, this class would
not
> see it.

As you and Florian discussed in another thread having it in the base class is
actually unsafe, having it here makes it less likely that we'll forget to update
it in case the instruction gets more data in the future.

Powered by Google App Engine
This is Rietveld 408576698