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

Side by Side Diff: src/compiler.cc

Issue 11661008: Sync laziness between BuildFunctionInfo and MakeFunctionInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 12 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 // 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 } 504 }
505 } 505 }
506 506
507 // Notify debugger 507 // Notify debugger
508 isolate->debugger()->OnBeforeCompile(script); 508 isolate->debugger()->OnBeforeCompile(script);
509 #endif 509 #endif
510 510
511 // Only allow non-global compiles for eval. 511 // Only allow non-global compiles for eval.
512 ASSERT(info->is_eval() || info->is_global()); 512 ASSERT(info->is_eval() || info->is_global());
513 ParsingFlags flags = kNoParsingFlags; 513 ParsingFlags flags = kNoParsingFlags;
514 if (info->pre_parse_data() != NULL || 514 if ((info->pre_parse_data() != NULL ||
515 String::cast(script->source())->length() > FLAG_min_preparse_length) { 515 String::cast(script->source())->length() > FLAG_min_preparse_length) &&
516 !isolate->DebuggerHasBreakPoints()) {
Michael Starzinger 2013/01/14 15:16:03 To make this completely consistent with the predic
516 flags = kAllowLazy; 517 flags = kAllowLazy;
517 } 518 }
518 if (!ParserApi::Parse(info, flags)) { 519 if (!ParserApi::Parse(info, flags)) {
519 return Handle<SharedFunctionInfo>::null(); 520 return Handle<SharedFunctionInfo>::null();
520 } 521 }
521 522
522 // Measure how long it takes to do the compilation; only take the 523 // Measure how long it takes to do the compilation; only take the
523 // rest of the function into account to avoid overlap with the 524 // rest of the function into account to avoid overlap with the
524 // parsing statistics. 525 // parsing statistics.
525 HistogramTimer* rate = info->is_eval() 526 HistogramTimer* rate = info->is_eval()
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 } 1111 }
1111 } 1112 }
1112 1113
1113 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1114 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1114 Handle<Script>(info->script()), 1115 Handle<Script>(info->script()),
1115 Handle<Code>(info->code()), 1116 Handle<Code>(info->code()),
1116 info)); 1117 info));
1117 } 1118 }
1118 1119
1119 } } // namespace v8::internal 1120 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-147497.js » ('j') | test/mjsunit/regress/regress-147497.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698