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

Side by Side Diff: src/compiler.cc

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break. Created 5 years, 2 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/code-stubs-hydrogen.cc ('k') | src/debug/liveedit.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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 // Frame specialization implies function context specialization. 781 // Frame specialization implies function context specialization.
782 DCHECK(!info->is_frame_specializing()); 782 DCHECK(!info->is_frame_specializing());
783 783
784 // Do not cache bound functions. 784 // Do not cache bound functions.
785 Handle<JSFunction> function = info->closure(); 785 Handle<JSFunction> function = info->closure();
786 if (function->shared()->bound()) return; 786 if (function->shared()->bound()) return;
787 787
788 // Cache optimized context-specific code. 788 // Cache optimized context-specific code.
789 if (FLAG_cache_optimized_code) { 789 if (FLAG_cache_optimized_code) {
790 Handle<SharedFunctionInfo> shared(function->shared()); 790 Handle<SharedFunctionInfo> shared(function->shared());
791 Handle<FixedArray> literals(function->literals()); 791 Handle<LiteralsArray> literals(function->literals());
792 Handle<Context> native_context(function->context()->native_context()); 792 Handle<Context> native_context(function->context()->native_context());
793 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, 793 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
794 literals, info->osr_ast_id()); 794 literals, info->osr_ast_id());
795 } 795 }
796 796
797 // Do not cache context-independent code compiled for OSR. 797 // Do not cache context-independent code compiled for OSR.
798 if (code->is_turbofanned() && info->is_osr()) return; 798 if (code->is_turbofanned() && info->is_osr()) return;
799 799
800 // Cache optimized context-independent code. 800 // Cache optimized context-independent code.
801 if (FLAG_turbo_cache_shared_code && code->is_turbofanned()) { 801 if (FLAG_turbo_cache_shared_code && code->is_turbofanned()) {
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 } 1761 }
1762 1762
1763 #if DEBUG 1763 #if DEBUG
1764 void CompilationInfo::PrintAstForTesting() { 1764 void CompilationInfo::PrintAstForTesting() {
1765 PrintF("--- Source from AST ---\n%s\n", 1765 PrintF("--- Source from AST ---\n%s\n",
1766 PrettyPrinter(isolate(), zone()).PrintProgram(literal())); 1766 PrettyPrinter(isolate(), zone()).PrintProgram(literal()));
1767 } 1767 }
1768 #endif 1768 #endif
1769 } // namespace internal 1769 } // namespace internal
1770 } // namespace v8 1770 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698