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

Side by Side Diff: src/compiler.cc

Issue 10836132: Force eager compilation of parenthesized functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« src/ast.h ('K') | « src/ast.h ('k') | src/parser.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 // 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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 // of functions without an outer context when setting a breakpoint through 922 // of functions without an outer context when setting a breakpoint through
923 // Runtime::FindSharedFunctionInfoInScript. 923 // Runtime::FindSharedFunctionInfoInScript.
924 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext(); 924 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext();
925 bool allow_lazy = literal->AllowsLazyCompilation() && 925 bool allow_lazy = literal->AllowsLazyCompilation() &&
926 !LiveEditFunctionTracker::IsActive(info.isolate()) && 926 !LiveEditFunctionTracker::IsActive(info.isolate()) &&
927 (!info.isolate()->DebuggerHasBreakPoints() || allow_lazy_without_ctx); 927 (!info.isolate()->DebuggerHasBreakPoints() || allow_lazy_without_ctx);
928 928
929 Handle<ScopeInfo> scope_info(ScopeInfo::Empty()); 929 Handle<ScopeInfo> scope_info(ScopeInfo::Empty());
930 930
931 // Generate code 931 // Generate code
932 if (FLAG_lazy && allow_lazy) { 932 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) {
933 Handle<Code> code = info.isolate()->builtins()->LazyCompile(); 933 Handle<Code> code = info.isolate()->builtins()->LazyCompile();
934 info.SetCode(code); 934 info.SetCode(code);
935 } else if (GenerateCode(&info)) { 935 } else if (GenerateCode(&info)) {
936 ASSERT(!info.code().is_null()); 936 ASSERT(!info.code().is_null());
937 scope_info = ScopeInfo::Create(info.scope(), info.zone()); 937 scope_info = ScopeInfo::Create(info.scope(), info.zone());
938 } else { 938 } else {
939 return Handle<SharedFunctionInfo>::null(); 939 return Handle<SharedFunctionInfo>::null();
940 } 940 }
941 941
942 // Create a shared function info object. 942 // Create a shared function info object.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 } 1027 }
1028 } 1028 }
1029 1029
1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1031 Handle<Script>(info->script()), 1031 Handle<Script>(info->script()),
1032 Handle<Code>(info->code()), 1032 Handle<Code>(info->code()),
1033 info)); 1033 info));
1034 } 1034 }
1035 1035
1036 } } // namespace v8::internal 1036 } } // namespace v8::internal
OLDNEW
« src/ast.h ('K') | « src/ast.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698