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

Side by Side Diff: src/parser.cc

Issue 50463003: Merged r17425, r17428 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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/lithium-ia32.cc ('k') | src/version.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 set_allow_modules(!info->is_native() && FLAG_harmony_modules); 558 set_allow_modules(!info->is_native() && FLAG_harmony_modules);
559 set_allow_natives_syntax(FLAG_allow_natives_syntax || info->is_native()); 559 set_allow_natives_syntax(FLAG_allow_natives_syntax || info->is_native());
560 set_allow_lazy(false); // Must be explicitly enabled. 560 set_allow_lazy(false); // Must be explicitly enabled.
561 set_allow_generators(FLAG_harmony_generators); 561 set_allow_generators(FLAG_harmony_generators);
562 set_allow_for_of(FLAG_harmony_iteration); 562 set_allow_for_of(FLAG_harmony_iteration);
563 set_allow_harmony_numeric_literals(FLAG_harmony_numeric_literals); 563 set_allow_harmony_numeric_literals(FLAG_harmony_numeric_literals);
564 } 564 }
565 565
566 566
567 FunctionLiteral* Parser::ParseProgram() { 567 FunctionLiteral* Parser::ParseProgram() {
568 HistogramTimerScope timer_scope(isolate()->counters()->parse()); 568 // TODO(bmeurer): We temporarily need to pass allow_nesting = true here,
569 // see comment for HistogramTimerScope class.
570 HistogramTimerScope timer_scope(isolate()->counters()->parse(), true);
569 Handle<String> source(String::cast(script_->source())); 571 Handle<String> source(String::cast(script_->source()));
570 isolate()->counters()->total_parse_size()->Increment(source->length()); 572 isolate()->counters()->total_parse_size()->Increment(source->length());
571 ElapsedTimer timer; 573 ElapsedTimer timer;
572 if (FLAG_trace_parse) { 574 if (FLAG_trace_parse) {
573 timer.Start(); 575 timer.Start();
574 } 576 }
575 fni_ = new(zone()) FuncNameInferrer(isolate(), zone()); 577 fni_ = new(zone()) FuncNameInferrer(isolate(), zone());
576 578
577 // Initialize parser state. 579 // Initialize parser state.
578 source->TryFlatten(); 580 source->TryFlatten();
(...skipping 5269 matching lines...) Expand 10 before | Expand all | Expand 10 after
5848 ASSERT(info()->isolate()->has_pending_exception()); 5850 ASSERT(info()->isolate()->has_pending_exception());
5849 } else { 5851 } else {
5850 result = ParseProgram(); 5852 result = ParseProgram();
5851 } 5853 }
5852 } 5854 }
5853 info()->SetFunction(result); 5855 info()->SetFunction(result);
5854 return (result != NULL); 5856 return (result != NULL);
5855 } 5857 }
5856 5858
5857 } } // namespace v8::internal 5859 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698