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

Side by Side Diff: src/compiler.cc

Issue 1080253003: VectorICs: recreate feedback vector if scoping changes on recompile. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename a function. Created 5 years, 8 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/type-feedback-vector.h » ('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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time. 244 // for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time.
245 bool CompilationInfo::ShouldSelfOptimize() { 245 bool CompilationInfo::ShouldSelfOptimize() {
246 return FLAG_crankshaft && !function()->flags()->Contains(kDontSelfOptimize) && 246 return FLAG_crankshaft && !function()->flags()->Contains(kDontSelfOptimize) &&
247 !function()->dont_optimize() && 247 !function()->dont_optimize() &&
248 function()->scope()->AllowsLazyCompilation() && 248 function()->scope()->AllowsLazyCompilation() &&
249 (!has_shared_info() || !shared_info()->optimization_disabled()); 249 (!has_shared_info() || !shared_info()->optimization_disabled());
250 } 250 }
251 251
252 252
253 void CompilationInfo::EnsureFeedbackVector() { 253 void CompilationInfo::EnsureFeedbackVector() {
254 if (feedback_vector_.is_null()) { 254 if (feedback_vector_.is_null() ||
255 feedback_vector_->SpecDiffersFrom(function()->feedback_vector_spec())) {
255 feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector( 256 feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector(
256 function()->feedback_vector_spec()); 257 function()->feedback_vector_spec());
257 } 258 }
258 } 259 }
259 260
260 261
261 bool CompilationInfo::is_simple_parameter_list() { 262 bool CompilationInfo::is_simple_parameter_list() {
262 return scope()->is_simple_parameter_list(); 263 return scope()->is_simple_parameter_list();
263 } 264 }
264 265
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 } 1591 }
1591 1592
1592 1593
1593 #if DEBUG 1594 #if DEBUG
1594 void CompilationInfo::PrintAstForTesting() { 1595 void CompilationInfo::PrintAstForTesting() {
1595 PrintF("--- Source from AST ---\n%s\n", 1596 PrintF("--- Source from AST ---\n%s\n",
1596 PrettyPrinter(isolate(), zone()).PrintProgram(function())); 1597 PrettyPrinter(isolate(), zone()).PrintProgram(function()));
1597 } 1598 }
1598 #endif 1599 #endif
1599 } } // namespace v8::internal 1600 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/type-feedback-vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698