Commit db52dbbb authored by ssanfilippo's avatar ssanfilippo Committed by Commit bot

[Interpreter] Print constant pool in generate-bytecode-expectations

This is a follow-up to https://crrev.com/1671863002, adding the
capability to print the contents of the constant pool. The expected
type of the pool is taken from command line, and it's either:

* string/int/double: assume all constants have the specified type.
  This way, we can emit a meaningful representation, e.g. a quoted
  string for type string and so on. All the constants in the pool must
  have the same type, otherwise one or more CHECK() will fail and the
  program will eventually crash.

* mixed: print the InstanceType tag instead of the actual value.
  This is the choice for those tests where the type of the constants in
  the pool is not uniform, however only a type tag is printed, not the
  actual value of the entries. SMIs are an exception, since they do not
  have an InstanceType tag, so kInstanceTypeDontCare is printed instead.

In addition to that, functions Print{ExpectedSnippet,BytecodeSequence}
have been extracted with no functional change. It's just for improving
readability, since the code is becoming quite long.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1686963002

Cr-Commit-Position: refs/heads/master@{#33888}
parent ad943fe4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment