Reviewers: oth, Benedikt Meurer, Michael Starzinger,

Message:
Thanks Orion.

Benedikt / Michael: Could you take a look please. Let me know if you would
prefer it split this up further, but I think it makes sense to review as is. If you are happy with the general direction I will add other architectures and add
unittests to test the behavior of the generated bytecode handlers are as
expected.




https://codereview.chromium.org/1239793002/diff/1/src/compiler/linkage-impl.h
File src/compiler/linkage-impl.h (right):

https://codereview.chromium.org/1239793002/diff/1/src/compiler/linkage-impl.h#newcode243
src/compiler/linkage-impl.h:243: DCHECK_EQ(0,
InterpreterAssembler::kBytecodePointerParameter);
On 2015/07/15 13:22:01, oth wrote:
One line comment explaining types purpose (reserving registers).

Done.

https://codereview.chromium.org/1239793002/diff/1/src/compiler/linkage.h
File src/compiler/linkage.h (right):

https://codereview.chromium.org/1239793002/diff/1/src/compiler/linkage.h#newcode245
src/compiler/linkage.h:245: bool needs_return);
On 2015/07/15 13:22:01, oth wrote:
Suggest a comment on needs_return or a more indicative name (e.g.
function_returns_value).

Added a comment and changed the name to will_return.

https://codereview.chromium.org/1239793002/diff/1/src/compiler/raw-machine-assembler.h
File src/compiler/raw-machine-assembler.h (right):

https://codereview.chromium.org/1239793002/diff/1/src/compiler/raw-machine-assembler.h#newcode54
src/compiler/raw-machine-assembler.h:54: CallDescriptor*
call_descriptor);
On 2015/07/15 13:22:01, oth wrote:
The two constructors for RawMachineAssembler could be rolled into one,
but
adding a default parameter CallDescriptor* call_descriptor = nullptr
to the
existing constructor.


The existing constructor passes
Linkage::GetSimplifiedCDescriptor(graph->zone(), machine_sig) to
call_descriptor, so a nullptr default wouldn't really work the same way
unfortunately (unless I explicitly checked for nullptr in the
constructor, but that seems nasty).

However, I agree it would be nice to avoid the double constructors, so
I've refactored the existing RawMachineAssembler to explicitly pass the
correct CallDescriptor instead. I moved this to a seperate CL at
https://codereview.chromium.org/1235313002, let me know what you think?

Description:
[interpreter] Add basic framework for bytecode handler code generation.

Adds basic support for generation of interpreter bytecode handler code
snippets. The InterpreterAssembler class exposes a set of low level,
interpreter specific operations which can be used to build a Turbofan
graph. The Interpreter class generates a bytecode handler snippet for
each bytecode by assembling operations using an InterpreterAssembler.

Currently only two simple bytecodes are supported: LoadLiteral0 and Return.

BUG=v8:4280
LOG=N

Please review this at https://codereview.chromium.org/1239793002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+581, -19 lines):
  M src/DEPS
  M src/compiler/arm/linkage-arm.cc
  A src/compiler/interpreter-assembler.h
  A src/compiler/interpreter-assembler.cc
  M src/compiler/linkage.h
  M src/compiler/linkage-impl.h
  M src/compiler/raw-machine-assembler.h
  M src/flag-definitions.h
  M src/heap/heap.h
  A src/interpreter/DEPS
  A + src/interpreter/OWNERS
  A src/interpreter/bytecodes.h
  A src/interpreter/bytecodes.cc
  A src/interpreter/interpreter.h
  A src/interpreter/interpreter.cc
  M src/isolate.h
  M src/isolate.cc
  M tools/gyp/v8.gyp


--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to