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

Side by Side Diff: src/compiler.cc

Issue 1255153002: Debugger: do not reject data parsed in the background when debugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix
Patch Set: Created 5 years, 4 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 | « no previous file | no next file » | 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/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 isolate->counters()->total_load_size()->Increment(source_length); 1320 isolate->counters()->total_load_size()->Increment(source_length);
1321 isolate->counters()->total_compile_size()->Increment(source_length); 1321 isolate->counters()->total_compile_size()->Increment(source_length);
1322 1322
1323 LanguageMode language_mode = 1323 LanguageMode language_mode =
1324 construct_language_mode(FLAG_use_strict, FLAG_use_strong); 1324 construct_language_mode(FLAG_use_strict, FLAG_use_strong);
1325 parse_info->set_language_mode( 1325 parse_info->set_language_mode(
1326 static_cast<LanguageMode>(parse_info->language_mode() | language_mode)); 1326 static_cast<LanguageMode>(parse_info->language_mode() | language_mode));
1327 1327
1328 CompilationInfo compile_info(parse_info); 1328 CompilationInfo compile_info(parse_info);
1329 1329
1330 // If compiling for debugging, parse eagerly from scratch. 1330 // The source was parsed lazily, so compiling for debugging is not possible.
1331 if (compile_info.is_debug()) parse_info->set_literal(NULL); 1331 DCHECK(!compile_info.is_debug());
1332 1332
1333 return CompileToplevel(&compile_info); 1333 return CompileToplevel(&compile_info);
1334 } 1334 }
1335 1335
1336 1336
1337 Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo( 1337 Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo(
1338 FunctionLiteral* literal, Handle<Script> script, 1338 FunctionLiteral* literal, Handle<Script> script,
1339 CompilationInfo* outer_info) { 1339 CompilationInfo* outer_info) {
1340 // Precondition: code has been parsed and scopes have been analyzed. 1340 // Precondition: code has been parsed and scopes have been analyzed.
1341 Isolate* isolate = outer_info->isolate(); 1341 Isolate* isolate = outer_info->isolate();
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 1616
1617 1617
1618 #if DEBUG 1618 #if DEBUG
1619 void CompilationInfo::PrintAstForTesting() { 1619 void CompilationInfo::PrintAstForTesting() {
1620 PrintF("--- Source from AST ---\n%s\n", 1620 PrintF("--- Source from AST ---\n%s\n",
1621 PrettyPrinter(isolate(), zone()).PrintProgram(function())); 1621 PrettyPrinter(isolate(), zone()).PrintProgram(function()));
1622 } 1622 }
1623 #endif 1623 #endif
1624 } // namespace internal 1624 } // namespace internal
1625 } // namespace v8 1625 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698