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

Side by Side Diff: include/v8-preparser.h

Issue 6773009: PreParser build fix (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/preparser-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 namespace v8 { 67 namespace v8 {
68 68
69 69
70 class PreParserData { 70 class PreParserData {
71 public: 71 public:
72 PreParserData(size_t size, const uint8_t* data) 72 PreParserData(size_t size, const uint8_t* data)
73 : data_(data), size_(size) { } 73 : data_(data), size_(size) { }
74 74
75 // Create a PreParserData value where stack_overflow reports true. 75 // Create a PreParserData value where stack_overflow reports true.
76 static PreParserData StackOverflow() { return PreParserData(NULL, 0); } 76 static PreParserData StackOverflow() { return PreParserData(0, 0); }
77 // Whether the pre-parser stopped due to a stack overflow. 77 // Whether the pre-parser stopped due to a stack overflow.
78 // If this is the case, size() and data() should not be used. 78 // If this is the case, size() and data() should not be used.
79 79
80 bool stack_overflow() { return size_ == 0u; } 80 bool stack_overflow() { return size_ == 0u; }
81 81
82 // The size of the data in bytes. 82 // The size of the data in bytes.
83 size_t size() const { return size_; } 83 size_t size() const { return size_; }
84 84
85 // Pointer to the data. 85 // Pointer to the data.
86 const uint8_t* data() const { return data_; } 86 const uint8_t* data() const { return data_; }
(...skipping 20 matching lines...) Expand all
107 // space that the preparser is allowed to use. If the preparser uses 107 // space that the preparser is allowed to use. If the preparser uses
108 // more stack space than the limit provided, the result's stack_overflow() 108 // more stack space than the limit provided, the result's stack_overflow()
109 // method will return true. Otherwise the result contains preparser 109 // method will return true. Otherwise the result contains preparser
110 // data that can be used by the V8 parser to speed up parsing. 110 // data that can be used by the V8 parser to speed up parsing.
111 PreParserData V8EXPORT Preparse(UnicodeInputStream* input, 111 PreParserData V8EXPORT Preparse(UnicodeInputStream* input,
112 size_t max_stack_size); 112 size_t max_stack_size);
113 113
114 } // namespace v8. 114 } // namespace v8.
115 115
116 #endif // PREPARSER_H 116 #endif // PREPARSER_H
OLDNEW
« no previous file with comments | « no previous file | src/preparser-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698