http://codereview.chromium.org/1889/diff/1/2
File src/ast.h (right):

http://codereview.chromium.org/1889/diff/1/2#newcode164
Line 164: bool is_const_init) {
On 2008/09/10 18:01:44, iposva wrote:
> Can you please use an enum for the is_const_init to improve the
readability at
> the caller sites?

Done.  InitState with values CONST_INIT and NOT_CONST_INIT defined in
ast.h for now, but will move to a more logical place as the codegen
state evolves.

http://codereview.chromium.org/1889/diff/1/3
File src/codegen-arm.cc (right):

http://codereview.chromium.org/1889/diff/1/3#newcode2033
Line 2033: ASSERT(!ref->is_illegal());
On 2008/09/10 18:01:44, iposva wrote:
> Nit: Don't you want to assert before accessing any fields of ref?

Changed.  Illegal references have a type, so it's safe to access it.
But it *is* clearer to read the preconditions earlier in the function.

http://codereview.chromium.org/1889/diff/1/3#newcode3295
Line 3295: // CodeGenState::LOAD_TYPEOF_EXPR.
On 2008/09/10 18:01:44, iposva wrote:
> Please assert that the CodeGenState is LOAD_TYPEOF_EXPR. That way you
ensure
> that you are not entering here with UNDEFINED or a newly added state.

Done.  Earlier assert already ruled out UNDEFINED, but the point about
new states is valid.

http://codereview.chromium.org/1889/diff/1/4
File src/codegen-ia32.cc (right):

http://codereview.chromium.org/1889/diff/1/4#newcode1141
Line 1141: ASSERT(!ref()->is_illegal());
On 2008/09/10 18:01:44, iposva wrote:
> Same nit as on ARM: Don't you want to assert before accessing ref?

Done.

http://codereview.chromium.org/1889/diff/1/4#newcode3496
Line 3496: // CodeGenState::LOAD_TYPEOF_EXPR.
On 2008/09/10 18:01:44, iposva wrote:
> Same comment as on ARM: Please assert that the CodeGenState is
LOAD_TYPEOF_EXPR.
> That way you ensure that you are not entering here with UNDEFINED or a
newly
> added state.

Done.

http://codereview.chromium.org/1889

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to