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

Side by Side Diff: src/compiler.cc

Issue 1974623002: Remove AstNode::PrettyPrint, --print-source, and --print-builtin-source (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 5 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
« no previous file with comments | « src/compiler.h ('k') | src/flag-definitions.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/asmjs/asm-js.h" 9 #include "src/asmjs/asm-js.h"
10 #include "src/asmjs/typing-asm.h" 10 #include "src/asmjs/typing-asm.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 DCHECK(DeclareGlobalsLanguageMode::is_valid(parse_info()->language_mode())); 221 DCHECK(DeclareGlobalsLanguageMode::is_valid(parse_info()->language_mode()));
222 return DeclareGlobalsEvalFlag::encode(parse_info()->is_eval()) | 222 return DeclareGlobalsEvalFlag::encode(parse_info()->is_eval()) |
223 DeclareGlobalsNativeFlag::encode(parse_info()->is_native()) | 223 DeclareGlobalsNativeFlag::encode(parse_info()->is_native()) |
224 DeclareGlobalsLanguageMode::encode(parse_info()->language_mode()); 224 DeclareGlobalsLanguageMode::encode(parse_info()->language_mode());
225 } 225 }
226 226
227 bool CompilationInfo::ExpectsJSReceiverAsReceiver() { 227 bool CompilationInfo::ExpectsJSReceiverAsReceiver() {
228 return is_sloppy(parse_info()->language_mode()) && !parse_info()->is_native(); 228 return is_sloppy(parse_info()->language_mode()) && !parse_info()->is_native();
229 } 229 }
230 230
231 #if DEBUG
232 void CompilationInfo::PrintAstForTesting() {
233 PrintF("--- Source from AST ---\n%s\n",
234 PrettyPrinter(isolate()).PrintProgram(literal()));
235 }
236 #endif
237
238 // ---------------------------------------------------------------------------- 231 // ----------------------------------------------------------------------------
239 // Implementation of CompilationJob 232 // Implementation of CompilationJob
240 233
241 CompilationJob::Status CompilationJob::CreateGraph() { 234 CompilationJob::Status CompilationJob::CreateGraph() {
242 DisallowJavascriptExecution no_js(isolate()); 235 DisallowJavascriptExecution no_js(isolate());
243 DCHECK(info()->IsOptimizing()); 236 DCHECK(info()->IsOptimizing());
244 237
245 if (FLAG_trace_opt) { 238 if (FLAG_trace_opt) {
246 OFStream os(stdout); 239 OFStream os(stdout);
247 os << "[compiling method " << Brief(*info()->closure()) << " using " 240 os << "[compiling method " << Brief(*info()->closure()) << " using "
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 DCHECK(shared->is_compiled()); 1818 DCHECK(shared->is_compiled());
1826 function->set_literals(cached.literals); 1819 function->set_literals(cached.literals);
1827 } else if (shared->is_compiled()) { 1820 } else if (shared->is_compiled()) {
1828 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1821 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1829 JSFunction::EnsureLiterals(function); 1822 JSFunction::EnsureLiterals(function);
1830 } 1823 }
1831 } 1824 }
1832 1825
1833 } // namespace internal 1826 } // namespace internal
1834 } // namespace v8 1827 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698