Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: src/parser.h

Issue 3412034: Avoid logging preparse-data inside lazily compiled functions. (Closed)
Patch Set: Addressed review comments. Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 8c00857276388d3640e2e217d5c99f18f51f6f2d..b4532aa6ed5822f848759dc8f98b3839afeb6c8f 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -72,19 +72,9 @@ class FunctionEntry BASE_EMBEDDED {
backing_[kPropertyCountOffset] = value;
}
- int predata_function_skip() { return backing_[kPredataFunctionSkipOffset]; }
- void set_predata_function_skip(int value) {
- backing_[kPredataFunctionSkipOffset] = value;
- }
-
- int predata_symbol_skip() { return backing_[kPredataSymbolSkipOffset]; }
- void set_predata_symbol_skip(int value) {
- backing_[kPredataSymbolSkipOffset] = value;
- }
-
bool is_valid() { return backing_.length() > 0; }
- static const int kSize = 6;
+ static const int kSize = 4;
private:
Vector<unsigned> backing_;
@@ -92,8 +82,6 @@ class FunctionEntry BASE_EMBEDDED {
static const int kEndPosOffset = 1;
static const int kLiteralCountOffset = 2;
static const int kPropertyCountOffset = 3;
- static const int kPredataFunctionSkipOffset = 4;
- static const int kPredataSymbolSkipOffset = 5;
};
@@ -117,7 +105,6 @@ class ScriptDataImpl : public ScriptData {
FunctionEntry GetFunctionEntry(int start);
int GetSymbolIdentifier();
- void SkipFunctionEntry(int start);
bool SanityCheck();
Scanner::Location MessageLocation();
@@ -133,28 +120,8 @@ class ScriptDataImpl : public ScriptData {
unsigned magic() { return store_[kMagicOffset]; }
unsigned version() { return store_[kVersionOffset]; }
- // Skip forward in the preparser data by the given number
- // of unsigned ints of function entries and the given number of bytes of
- // symbol id encoding.
- void Skip(int function_entries, int symbol_entries) {
- ASSERT(function_entries >= 0);
- ASSERT(function_entries
- <= (static_cast<int>(store_[kFunctionsSizeOffset])
- - (function_index_ - kHeaderSize)));
- ASSERT(symbol_entries >= 0);
- ASSERT(symbol_entries <= symbol_data_end_ - symbol_data_);
-
- unsigned max_function_skip = store_[kFunctionsSizeOffset] -
- static_cast<unsigned>(function_index_ - kHeaderSize);
- function_index_ +=
- Min(static_cast<unsigned>(function_entries), max_function_skip);
- symbol_data_ +=
- Min(static_cast<unsigned>(symbol_entries),
- static_cast<unsigned>(symbol_data_end_ - symbol_data_));
- }
-
static const unsigned kMagicNumber = 0xBadDead;
- static const unsigned kCurrentVersion = 3;
+ static const unsigned kCurrentVersion = 4;
static const int kMagicOffset = 0;
static const int kVersionOffset = 1;
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698