• loislo@chromium.org's avatar
    Extract hardcoded error strings into a single place and replace them with enum. · d2c443b7
    loislo@chromium.org authored
    I'd like to propagate bailout reason to cpu profiler.
    So I need to save it into heap object SharedFunctionInfo.
    But:
    1) all bailout reason strings spread across all the sources.
    2) they are native strings and if I convert them into String then I may have a performance issue.
    3) one byte is enough for 184 bailout reasons. Otherwise we need 8 bytes for the pointer.
    
    Also I think it would be nice to have error strings collected in one place.
    In that case we will get additional benefits:
    
    It allows us to keep this set of messages under control.
    It gives us a chance to internationalize them.
    It slightly reduces the binary footprint.
    
    From the other hand the developers have to add new strings into that enum.
    
    BUG=
    R=jkummerow@chromium.org
    
    Review URL: https://codereview.chromium.org/20843012
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    d2c443b7
Name
Last commit
Last update
..
assembler-ia32-inl.h Loading commit data...
assembler-ia32.cc Loading commit data...
assembler-ia32.h Loading commit data...
builtins-ia32.cc Loading commit data...
code-stubs-ia32.cc Loading commit data...
code-stubs-ia32.h Loading commit data...
codegen-ia32.cc Loading commit data...
codegen-ia32.h Loading commit data...
cpu-ia32.cc Loading commit data...
debug-ia32.cc Loading commit data...
deoptimizer-ia32.cc Loading commit data...
disasm-ia32.cc Loading commit data...
frames-ia32.cc Loading commit data...
frames-ia32.h Loading commit data...
full-codegen-ia32.cc Loading commit data...
ic-ia32.cc Loading commit data...
lithium-codegen-ia32.cc Loading commit data...
lithium-codegen-ia32.h Loading commit data...
lithium-gap-resolver-ia32.cc Loading commit data...
lithium-gap-resolver-ia32.h Loading commit data...
lithium-ia32.cc Loading commit data...
lithium-ia32.h Loading commit data...
macro-assembler-ia32.cc Loading commit data...
macro-assembler-ia32.h Loading commit data...
regexp-macro-assembler-ia32.cc Loading commit data...
regexp-macro-assembler-ia32.h Loading commit data...
simulator-ia32.cc Loading commit data...
simulator-ia32.h Loading commit data...
stub-cache-ia32.cc Loading commit data...