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

Side by Side Diff: third_party/WebKit/JavaScriptCore/parser/Lexer.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All Rights Reserved.
4 * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) 4 * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca)
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 , m_next1(0) 73 , m_next1(0)
74 , m_next2(0) 74 , m_next2(0)
75 , m_next3(0) 75 , m_next3(0)
76 , m_currentOffset(0) 76 , m_currentOffset(0)
77 , m_nextOffset1(0) 77 , m_nextOffset1(0)
78 , m_nextOffset2(0) 78 , m_nextOffset2(0)
79 , m_nextOffset3(0) 79 , m_nextOffset3(0)
80 , m_globalData(globalData) 80 , m_globalData(globalData)
81 , m_mainTable(JSC::mainTable) 81 , m_mainTable(JSC::mainTable)
82 { 82 {
83 m_buffer8.reserveCapacity(initialReadBufferCapacity); 83 m_buffer8.reserveInitialCapacity(initialReadBufferCapacity);
84 m_buffer16.reserveCapacity(initialReadBufferCapacity); 84 m_buffer16.reserveInitialCapacity(initialReadBufferCapacity);
85 } 85 }
86 86
87 Lexer::~Lexer() 87 Lexer::~Lexer()
88 { 88 {
89 m_mainTable.deleteTable(); 89 m_mainTable.deleteTable();
90 } 90 }
91 91
92 void Lexer::setCode(const SourceCode& source) 92 void Lexer::setCode(const SourceCode& source)
93 { 93 {
94 yylineno = source.firstLine(); 94 yylineno = source.firstLine();
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 m_flags = UString(m_buffer16); 877 m_flags = UString(m_buffer16);
878 878
879 return true; 879 return true;
880 } 880 }
881 881
882 void Lexer::clear() 882 void Lexer::clear()
883 { 883 {
884 m_identifiers.clear(); 884 m_identifiers.clear();
885 885
886 Vector<char> newBuffer8; 886 Vector<char> newBuffer8;
887 newBuffer8.reserveCapacity(initialReadBufferCapacity); 887 newBuffer8.reserveInitialCapacity(initialReadBufferCapacity);
888 m_buffer8.swap(newBuffer8); 888 m_buffer8.swap(newBuffer8);
889 889
890 Vector<UChar> newBuffer16; 890 Vector<UChar> newBuffer16;
891 newBuffer16.reserveCapacity(initialReadBufferCapacity); 891 newBuffer16.reserveInitialCapacity(initialReadBufferCapacity);
892 m_buffer16.swap(newBuffer16); 892 m_buffer16.swap(newBuffer16);
893 893
894 m_isReparsing = false; 894 m_isReparsing = false;
895 895
896 m_pattern = 0; 896 m_pattern = 0;
897 m_flags = 0; 897 m_flags = 0;
898 } 898 }
899 899
900 } // namespace JSC 900 } // namespace JSC
901 901
902 902
OLDNEW
« no previous file with comments | « third_party/WebKit/JavaScriptCore/JavaScriptCore.exp ('k') | third_party/WebKit/JavaScriptCore/runtime/JSByteArray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698