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

Unified Diff: src/compiler.cc

Issue 907403002: [strong] Introduce --use-strong flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added flag implication Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 12437f8a2b9162890552b69ad8619d843f1d45bd..8961debaab4055f5869c9df0d6b73b1b203b41fa 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1358,10 +1358,11 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
compile_options == ScriptCompiler::kProduceCodeCache) {
info.PrepareForSerializing();
}
- if (FLAG_use_strict) {
- info.SetLanguageMode(
- static_cast<LanguageMode>(info.language_mode() | STRICT_BIT));
- }
+
+ LanguageMode language_mode =
+ construct_language_mode(FLAG_use_strict, FLAG_use_strong);
+ info.SetLanguageMode(
+ static_cast<LanguageMode>(info.language_mode() | language_mode));
result = CompileToplevel(&info);
if (extension == NULL && !result.is_null() && !result->dont_cache()) {
@@ -1392,10 +1393,11 @@ Handle<SharedFunctionInfo> Compiler::CompileStreamedScript(
isolate->counters()->total_load_size()->Increment(source_length);
isolate->counters()->total_compile_size()->Increment(source_length);
- if (FLAG_use_strict) {
- info->SetLanguageMode(
- static_cast<LanguageMode>(info->language_mode() | STRICT_BIT));
- }
+ LanguageMode language_mode =
+ construct_language_mode(FLAG_use_strict, FLAG_use_strong);
+ info->SetLanguageMode(
+ static_cast<LanguageMode>(info->language_mode() | language_mode));
+
// TODO(marja): FLAG_serialize_toplevel is not honoured and won't be; when the
// real code caching lands, streaming needs to be adapted to use it.
return CompileToplevel(info);
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698