Looks great to me (once tests are added). Maybe let Michael have a look too?

For tests, how about adding a cctest (we probably do this as a unittests) which
compiles JS source and checks if the resulting bytecode is as expected?


https://codereview.chromium.org/1294543002/diff/1/src/flag-definitions.h
File src/flag-definitions.h (right):

https://codereview.chromium.org/1294543002/diff/1/src/flag-definitions.h#newcode284
src/flag-definitions.h:284: DEFINE_BOOL(print_ignition_bytecode, false,
"print generated bytecode")
nit - just print_bytecode and add Ignition to the description?

https://codereview.chromium.org/1294543002/diff/1/src/interpreter/bytecode-generator.cc
File src/interpreter/bytecode-generator.cc (right):

https://codereview.chromium.org/1294543002/diff/1/src/interpreter/bytecode-generator.cc#newcode75
src/interpreter/bytecode-generator.cc:75: // Details stored in scope, ie
variable index.
/s/ie/i.e.

https://codereview.chromium.org/1294543002/diff/1/src/interpreter/bytecode-generator.cc#newcode202
src/interpreter/bytecode-generator.cc:202:
DCHECK(!expr->IsPropertyName());
Could you make this an if/else or switch statement with the propertyName
case being unimplemented().

https://codereview.chromium.org/1294543002/diff/1/src/interpreter/bytecode-generator.cc#newcode239
src/interpreter/bytecode-generator.cc:239: DCHECK(variable->location()
== VariableLocation::LOCAL);
Could you do this as a switch statement, with all other cases falling
through to undefined for now.

https://codereview.chromium.org/1294543002/diff/1/src/interpreter/bytecode-generator.cc#newcode268
src/interpreter/bytecode-generator.cc:268:
builder().StoreAccumulatorInRegister(Register(destination));
We would only be storing the value in a register if it is a VARIABLE
case, wouldn't we? Could you move the switch down so this is part of the
VARIABLE case and destination can be a Register instead of an index?

https://codereview.chromium.org/1294543002/

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to