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

Side by Side Diff: src/parsing/parser.h

Issue 2261463002: There are only 2 language modes, not 3 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo last_language_mode Created 4 years, 4 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
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PARSING_PARSER_H_ 5 #ifndef V8_PARSING_PARSER_H_
6 #define V8_PARSING_PARSER_H_ 6 #define V8_PARSING_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void set_isolate(Isolate* isolate) { isolate_ = isolate; } 168 void set_isolate(Isolate* isolate) { isolate_ = isolate; }
169 void set_shared_info(Handle<SharedFunctionInfo> shared) { shared_ = shared; } 169 void set_shared_info(Handle<SharedFunctionInfo> shared) { shared_ = shared; }
170 void set_context(Handle<Context> context) { context_ = context; } 170 void set_context(Handle<Context> context) { context_ = context; }
171 void set_script(Handle<Script> script) { script_ = script; } 171 void set_script(Handle<Script> script) { script_ = script; }
172 //-------------------------------------------------------------------------- 172 //--------------------------------------------------------------------------
173 173
174 LanguageMode language_mode() const { 174 LanguageMode language_mode() const {
175 return construct_language_mode(is_strict_mode()); 175 return construct_language_mode(is_strict_mode());
176 } 176 }
177 void set_language_mode(LanguageMode language_mode) { 177 void set_language_mode(LanguageMode language_mode) {
178 STATIC_ASSERT(LANGUAGE_END == 3); 178 STATIC_ASSERT(LANGUAGE_END == 2);
179 set_strict_mode(is_strict(language_mode)); 179 set_strict_mode(is_strict(language_mode));
180 } 180 }
181 181
182 void ReopenHandlesInNewHandleScope() { 182 void ReopenHandlesInNewHandleScope() {
183 shared_ = Handle<SharedFunctionInfo>(*shared_); 183 shared_ = Handle<SharedFunctionInfo>(*shared_);
184 script_ = Handle<Script>(*script_); 184 script_ = Handle<Script>(*script_);
185 context_ = Handle<Context>(*context_); 185 context_ = Handle<Context>(*context_);
186 } 186 }
187 187
188 #ifdef DEBUG 188 #ifdef DEBUG
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 1377
1378 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1378 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1379 return parser_->ParseDoExpression(ok); 1379 return parser_->ParseDoExpression(ok);
1380 } 1380 }
1381 1381
1382 1382
1383 } // namespace internal 1383 } // namespace internal
1384 } // namespace v8 1384 } // namespace v8
1385 1385
1386 #endif // V8_PARSING_PARSER_H_ 1386 #endif // V8_PARSING_PARSER_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698