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

Side by Side Diff: src/compiler.cc

Issue 10914065: Fix FindSharedFunctionInfoInScript to not optimize. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. Created 8 years, 3 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 | « no previous file | src/debug.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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 929
930 LiveEditFunctionTracker live_edit_tracker(info.isolate(), literal); 930 LiveEditFunctionTracker live_edit_tracker(info.isolate(), literal);
931 // Determine if the function can be lazily compiled. This is necessary to 931 // Determine if the function can be lazily compiled. This is necessary to
932 // allow some of our builtin JS files to be lazily compiled. These 932 // allow some of our builtin JS files to be lazily compiled. These
933 // builtins cannot be handled lazily by the parser, since we have to know 933 // builtins cannot be handled lazily by the parser, since we have to know
934 // if a function uses the special natives syntax, which is something the 934 // if a function uses the special natives syntax, which is something the
935 // parser records. 935 // parser records.
936 // If the debugger requests compilation for break points, we cannot be 936 // If the debugger requests compilation for break points, we cannot be
937 // aggressive about lazy compilation, because it might trigger compilation 937 // aggressive about lazy compilation, because it might trigger compilation
938 // of functions without an outer context when setting a breakpoint through 938 // of functions without an outer context when setting a breakpoint through
939 // Runtime::FindSharedFunctionInfoInScript. 939 // Debug::FindSharedFunctionInfoInScript.
940 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext(); 940 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext();
941 bool allow_lazy = literal->AllowsLazyCompilation() && 941 bool allow_lazy = literal->AllowsLazyCompilation() &&
942 !LiveEditFunctionTracker::IsActive(info.isolate()) && 942 !LiveEditFunctionTracker::IsActive(info.isolate()) &&
943 (!info.isolate()->DebuggerHasBreakPoints() || allow_lazy_without_ctx); 943 (!info.isolate()->DebuggerHasBreakPoints() || allow_lazy_without_ctx);
944 944
945 Handle<ScopeInfo> scope_info(ScopeInfo::Empty()); 945 Handle<ScopeInfo> scope_info(ScopeInfo::Empty());
946 946
947 // Generate code 947 // Generate code
948 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) { 948 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) {
949 Handle<Code> code = info.isolate()->builtins()->LazyCompile(); 949 Handle<Code> code = info.isolate()->builtins()->LazyCompile();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 } 1043 }
1044 } 1044 }
1045 1045
1046 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1046 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1047 Handle<Script>(info->script()), 1047 Handle<Script>(info->script()),
1048 Handle<Code>(info->code()), 1048 Handle<Code>(info->code()),
1049 info)); 1049 info));
1050 } 1050 }
1051 1051
1052 } } // namespace v8::internal 1052 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698