98cd283399
Removing it seems to be a clear win on mobile: producing symbol data makes cold parsing 20-30% slower, and having symbol data doesn't make warm parsing any faster. Notes: - V8 used to produce symbol data, but because of a bug, it was never used until recently. (See fix https://codereview.chromium.org/172753002 which takes the symbol data into use again.) - On desktop, warm parsing is faster if we have symbol data, and producing it during cold parsing doesn't make parsing substantially slower. However, this doesn't seem to be the case on mobile. - The preparse data (cached data) will now contain only the positions of the lazy functions. BUG= R=dcarney@chromium.org Review URL: https://codereview.chromium.org/261273003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
// Copyright 2011 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_PREPARSE_DATA_FORMAT_H_
|
|
#define V8_PREPARSE_DATA_FORMAT_H_
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
// Generic and general data used by preparse data recorders and readers.
|
|
|
|
struct PreparseDataConstants {
|
|
public:
|
|
// Layout and constants of the preparse data exchange format.
|
|
static const unsigned kMagicNumber = 0xBadDead;
|
|
static const unsigned kCurrentVersion = 9;
|
|
|
|
static const int kMagicOffset = 0;
|
|
static const int kVersionOffset = 1;
|
|
static const int kHasErrorOffset = 2;
|
|
static const int kFunctionsSizeOffset = 3;
|
|
static const int kSizeOffset = 4;
|
|
static const int kHeaderSize = 5;
|
|
|
|
// If encoding a message, the following positions are fixed.
|
|
static const int kMessageStartPos = 0;
|
|
static const int kMessageEndPos = 1;
|
|
static const int kMessageArgCountPos = 2;
|
|
static const int kIsReferenceErrorPos = 3;
|
|
static const int kMessageTextPos = 4;
|
|
|
|
static const unsigned char kNumberTerminator = 0x80u;
|
|
};
|
|
|
|
|
|
} } // namespace v8::internal.
|
|
|
|
#endif // V8_PREPARSE_DATA_FORMAT_H_
|