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

Side by Side Diff: src/compiler.cc

Issue 1804693002: Remove --harmony-modules flag and let embedder decide when modules are used (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/bootstrapper.cc ('k') | src/d8.cc » ('j') | src/d8.cc » ('J')
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/ast/ast-numbering.h" 9 #include "src/ast/ast-numbering.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 } 1643 }
1644 script->set_origin_options(resource_options); 1644 script->set_origin_options(resource_options);
1645 if (!source_map_url.is_null()) { 1645 if (!source_map_url.is_null()) {
1646 script->set_source_mapping_url(*source_map_url); 1646 script->set_source_mapping_url(*source_map_url);
1647 } 1647 }
1648 1648
1649 // Compile the function and add it to the cache. 1649 // Compile the function and add it to the cache.
1650 Zone zone; 1650 Zone zone;
1651 ParseInfo parse_info(&zone, script); 1651 ParseInfo parse_info(&zone, script);
1652 CompilationInfo info(&parse_info); 1652 CompilationInfo info(&parse_info);
1653 if (FLAG_harmony_modules && is_module) { 1653 if (is_module) {
1654 parse_info.set_module(); 1654 parse_info.set_module();
1655 } else { 1655 } else {
1656 parse_info.set_global(); 1656 parse_info.set_global();
1657 } 1657 }
1658 if (compile_options != ScriptCompiler::kNoCompileOptions) { 1658 if (compile_options != ScriptCompiler::kNoCompileOptions) {
1659 parse_info.set_cached_data(cached_data); 1659 parse_info.set_cached_data(cached_data);
1660 } 1660 }
1661 parse_info.set_compile_options(compile_options); 1661 parse_info.set_compile_options(compile_options);
1662 parse_info.set_extension(extension); 1662 parse_info.set_extension(extension);
1663 parse_info.set_context(context); 1663 parse_info.set_context(context);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 1972
1973 #if DEBUG 1973 #if DEBUG
1974 void CompilationInfo::PrintAstForTesting() { 1974 void CompilationInfo::PrintAstForTesting() {
1975 PrintF("--- Source from AST ---\n%s\n", 1975 PrintF("--- Source from AST ---\n%s\n",
1976 PrettyPrinter(isolate()).PrintProgram(literal())); 1976 PrettyPrinter(isolate()).PrintProgram(literal()));
1977 } 1977 }
1978 #endif 1978 #endif
1979 1979
1980 } // namespace internal 1980 } // namespace internal
1981 } // namespace v8 1981 } // namespace v8
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/d8.cc » ('j') | src/d8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698