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

Side by Side Diff: src/parser.cc

Issue 8286022: Revert r9619. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/type-info.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 5178 matching lines...) Expand 10 before | Expand all | Expand 10 after
5189 return !parser.failed(); 5189 return !parser.failed();
5190 } 5190 }
5191 5191
5192 5192
5193 bool ParserApi::Parse(CompilationInfo* info) { 5193 bool ParserApi::Parse(CompilationInfo* info) {
5194 ASSERT(info->function() == NULL); 5194 ASSERT(info->function() == NULL);
5195 FunctionLiteral* result = NULL; 5195 FunctionLiteral* result = NULL;
5196 Handle<Script> script = info->script(); 5196 Handle<Script> script = info->script();
5197 bool harmony_scoping = !info->is_native() && FLAG_harmony_scoping; 5197 bool harmony_scoping = !info->is_native() && FLAG_harmony_scoping;
5198 if (info->is_lazy()) { 5198 if (info->is_lazy()) {
5199 Parser parser(script, true, NULL, NULL); 5199 Parser parser(script, info->isolate()->bootstrapper()->IsActive() || info->a llows_natives_syntax(), NULL, NULL);
5200 parser.SetHarmonyScoping(harmony_scoping); 5200 parser.SetHarmonyScoping(harmony_scoping);
5201 result = parser.ParseLazy(info); 5201 result = parser.ParseLazy(info);
5202 } else { 5202 } else {
5203 // Whether we allow %identifier(..) syntax. 5203 // Whether we allow %identifier(..) syntax.
5204 bool allow_natives_syntax = 5204 bool allow_natives_syntax =
5205 info->allows_natives_syntax() || FLAG_allow_natives_syntax; 5205 info->allows_natives_syntax() || FLAG_allow_natives_syntax;
5206 ScriptDataImpl* pre_data = info->pre_parse_data(); 5206 ScriptDataImpl* pre_data = info->pre_parse_data();
5207 Parser parser(script, 5207 Parser parser(script,
5208 allow_natives_syntax, 5208 allow_natives_syntax,
5209 info->extension(), 5209 info->extension(),
(...skipping 15 matching lines...) Expand all
5225 result = parser.ParseProgram(source, 5225 result = parser.ParseProgram(source,
5226 info->is_global(), 5226 info->is_global(),
5227 info->StrictMode()); 5227 info->StrictMode());
5228 } 5228 }
5229 } 5229 }
5230 info->SetFunction(result); 5230 info->SetFunction(result);
5231 return (result != NULL); 5231 return (result != NULL);
5232 } 5232 }
5233 5233
5234 } } // namespace v8::internal 5234 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698