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

Side by Side Diff: src/compiler.cc

Issue 2120009: IA32: Use the full compiler when debugging... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // The normal choice of backend can be overridden with the flags 113 // The normal choice of backend can be overridden with the flags
114 // --always-full-compiler and --always-fast-compiler, which are mutually 114 // --always-full-compiler and --always-fast-compiler, which are mutually
115 // incompatible. 115 // incompatible.
116 CHECK(!FLAG_always_full_compiler || !FLAG_always_fast_compiler); 116 CHECK(!FLAG_always_full_compiler || !FLAG_always_fast_compiler);
117 117
118 Handle<SharedFunctionInfo> shared = info->shared_info(); 118 Handle<SharedFunctionInfo> shared = info->shared_info();
119 bool is_run_once = (shared.is_null()) 119 bool is_run_once = (shared.is_null())
120 ? info->scope()->is_global_scope() 120 ? info->scope()->is_global_scope()
121 : (shared->is_toplevel() || shared->try_full_codegen()); 121 : (shared->is_toplevel() || shared->try_full_codegen());
122 122
123 if (FLAG_always_full_compiler || (FLAG_full_compiler && is_run_once)) { 123 bool force_full_compiler = false;
124 #ifdef V8_TARGET_ARCH_IA32
125 // On ia32 the full compiler can compile all code whereas the other platforms
126 // the constructs supported is checked by the associated syntax checker. When
127 // --always-full-compiler is used on ia32 the syntax checker is still in
128 // effect, but there is a special flag --force-full-compiler to ignore the
129 // syntax checker completely and use the full compiler for all code. Also
130 // when debugging on ia32 the full compiler will be used for all code.
131 force_full_compiler =
132 Debugger::IsDebuggerActive() || FLAG_force_full_compiler;
133 #endif
134
135 if (force_full_compiler) {
136 return FullCodeGenerator::MakeCode(info);
137 } else if (FLAG_always_full_compiler || (FLAG_full_compiler && is_run_once)) {
124 FullCodeGenSyntaxChecker checker; 138 FullCodeGenSyntaxChecker checker;
125 checker.Check(function); 139 checker.Check(function);
126 if (checker.has_supported_syntax()) { 140 if (checker.has_supported_syntax()) {
127 return FullCodeGenerator::MakeCode(info); 141 return FullCodeGenerator::MakeCode(info);
128 } 142 }
129 } else if (FLAG_always_fast_compiler || 143 } else if (FLAG_always_fast_compiler ||
130 (FLAG_fast_compiler && !is_run_once)) { 144 (FLAG_fast_compiler && !is_run_once)) {
131 FastCodeGenSyntaxChecker checker; 145 FastCodeGenSyntaxChecker checker;
132 checker.Check(info); 146 checker.Check(info);
133 if (checker.has_supported_syntax()) { 147 if (checker.has_supported_syntax()) {
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script), 628 PROFILE(CodeCreateEvent(Logger::ToNativeByScript(tag, *script),
615 *code, *func_name)); 629 *code, *func_name));
616 OPROFILE(CreateNativeCodeRegion(*func_name, 630 OPROFILE(CreateNativeCodeRegion(*func_name,
617 code->instruction_start(), 631 code->instruction_start(),
618 code->instruction_size())); 632 code->instruction_size()));
619 } 633 }
620 } 634 }
621 } 635 }
622 636
623 } } // namespace v8::internal 637 } } // 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