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

Side by Side Diff: src/compiler.cc

Issue 1214953003: Debugger: allow recompiling toplevel code for debugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | src/debug.cc » ('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/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result); 1448 RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result);
1449 result->set_allows_lazy_compilation(literal->AllowsLazyCompilation()); 1449 result->set_allows_lazy_compilation(literal->AllowsLazyCompilation());
1450 result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx); 1450 result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx);
1451 1451
1452 // Set the expected number of properties for instances and return 1452 // Set the expected number of properties for instances and return
1453 // the resulting function. 1453 // the resulting function.
1454 SetExpectedNofPropertiesFromEstimate(result, 1454 SetExpectedNofPropertiesFromEstimate(result,
1455 literal->expected_property_count()); 1455 literal->expected_property_count());
1456 live_edit_tracker.RecordFunctionInfo(result, literal, info.zone()); 1456 live_edit_tracker.RecordFunctionInfo(result, literal, info.zone());
1457 return result; 1457 return result;
1458 } else { 1458 } else if (!lazy) {
1459 // We may have additional data from compilation now. 1459 // We have additional data from compilation now.
1460 DCHECK(!existing->is_compiled()); 1460 DCHECK(!existing->is_compiled());
1461 existing->ReplaceCode(*info.code()); 1461 existing->ReplaceCode(*info.code());
1462 existing->set_scope_info(*scope_info); 1462 existing->set_scope_info(*scope_info);
1463 existing->set_feedback_vector(*info.feedback_vector()); 1463 existing->set_feedback_vector(*info.feedback_vector());
1464 return existing;
1465 } 1464 }
1465 return existing;
1466 } 1466 }
1467 1467
1468 1468
1469 MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function, 1469 MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
1470 Handle<Code> current_code, 1470 Handle<Code> current_code,
1471 ConcurrencyMode mode, 1471 ConcurrencyMode mode,
1472 BailoutId osr_ast_id) { 1472 BailoutId osr_ast_id) {
1473 Handle<Code> cached_code; 1473 Handle<Code> cached_code;
1474 if (GetCodeFromOptimizedCodeMap( 1474 if (GetCodeFromOptimizedCodeMap(
1475 function, osr_ast_id).ToHandle(&cached_code)) { 1475 function, osr_ast_id).ToHandle(&cached_code)) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 1626
1627 1627
1628 #if DEBUG 1628 #if DEBUG
1629 void CompilationInfo::PrintAstForTesting() { 1629 void CompilationInfo::PrintAstForTesting() {
1630 PrintF("--- Source from AST ---\n%s\n", 1630 PrintF("--- Source from AST ---\n%s\n",
1631 PrettyPrinter(isolate(), zone()).PrintProgram(function())); 1631 PrettyPrinter(isolate(), zone()).PrintProgram(function()));
1632 } 1632 }
1633 #endif 1633 #endif
1634 } // namespace internal 1634 } // namespace internal
1635 } // namespace v8 1635 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698