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

Unified Diff: src/lexer/lexer.h

Issue 26764004: Invoke generated lexer along with baseline lexer to compare results. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 2 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
Index: src/lexer/lexer.h
diff --git a/src/hydrogen-bch.h b/src/lexer/lexer.h
similarity index 72%
copy from src/hydrogen-bch.h
copy to src/lexer/lexer.h
index a22dacdd4229748e2735b3c0d8519c927b2f617d..b01fffcf030ce48d6179074520151ad1388649b5 100644
--- a/src/hydrogen-bch.h
+++ b/src/lexer/lexer.h
@@ -25,31 +25,30 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_HYDROGEN_BCH_H_
-#define V8_HYDROGEN_BCH_H_
+#ifndef V8_LEXER_LEXER_H
+#define V8_LEXER_LEXER_H
-#include "hydrogen.h"
+#include "token.h"
+#include "flags.h"
-namespace v8 {
-namespace internal {
+class PushScanner;
-
-class HBoundsCheckHoistingPhase : public HPhase {
+class ExperimentalScanner {
public:
- explicit HBoundsCheckHoistingPhase(HGraph* graph)
- : HPhase("H_Bounds checks hoisting", graph) { }
-
- void Run() {
- HoistRedundantBoundsChecks();
- }
-
+ explicit ExperimentalScanner(const char* fname);
+ ~ExperimentalScanner();
+ v8::internal::Token::Value Next(int* beg_pos, int* end_pos);
+ void Record(v8::internal::Token::Value token, int beg_pos, int end_pos);
private:
- void HoistRedundantBoundsChecks();
-
- DISALLOW_COPY_AND_ASSIGN(HBoundsCheckHoistingPhase);
+ void FillTokens();
+ static const int BUFFER_SIZE = 256;
+ v8::internal::Token::Value token_[BUFFER_SIZE];
+ int beg_[BUFFER_SIZE];
+ int end_[BUFFER_SIZE];
+ int current_;
+ int fetched_;
+ FILE* file_;
+ PushScanner* scanner_;
};
-
-} } // namespace v8::internal
-
-#endif // V8_HYDROGEN_BCE_H_
+#endif // V8_LEXER_LEXER_H
« no previous file with comments | « src/flag-definitions.h ('k') | src/lexer/lexer.gyp » ('j') | src/lexer/lexer.re » ('J')

Powered by Google App Engine
This is Rietveld 408576698