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

Side by Side Diff: src/compiler.cc

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 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 | Annotate | Revision Log
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 !function()->dont_optimize() && 276 !function()->dont_optimize() &&
277 function()->scope()->AllowsLazyCompilation() && 277 function()->scope()->AllowsLazyCompilation() &&
278 (shared_info().is_null() || !shared_info()->optimization_disabled()); 278 (shared_info().is_null() || !shared_info()->optimization_disabled());
279 } 279 }
280 280
281 281
282 void CompilationInfo::PrepareForCompilation(Scope* scope) { 282 void CompilationInfo::PrepareForCompilation(Scope* scope) {
283 DCHECK(scope_ == NULL); 283 DCHECK(scope_ == NULL);
284 scope_ = scope; 284 scope_ = scope;
285 285
286 int length = function()->slot_count();
287 if (feedback_vector_.is_null()) { 286 if (feedback_vector_.is_null()) {
288 // Allocate the feedback vector too. 287 // Allocate the feedback vector too.
289 feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector(length); 288 feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector(
289 function()->slot_count(), function()->ic_slot_count());
290 } 290 }
291 DCHECK(feedback_vector_->length() == length); 291 DCHECK(feedback_vector_->Slots() == function()->slot_count() &&
292 feedback_vector_->ICSlots() == function()->ic_slot_count());
292 } 293 }
293 294
294 295
295 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { 296 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
296 public: 297 public:
297 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) 298 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
298 : HOptimizedGraphBuilder(info) { 299 : HOptimizedGraphBuilder(info) {
299 } 300 }
300 301
301 #define DEF_VISIT(type) \ 302 #define DEF_VISIT(type) \
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 AllowHandleDereference allow_deref; 1439 AllowHandleDereference allow_deref;
1439 bool tracing_on = info()->IsStub() 1440 bool tracing_on = info()->IsStub()
1440 ? FLAG_trace_hydrogen_stubs 1441 ? FLAG_trace_hydrogen_stubs
1441 : (FLAG_trace_hydrogen && 1442 : (FLAG_trace_hydrogen &&
1442 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1443 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1443 return (tracing_on && 1444 return (tracing_on &&
1444 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1445 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1445 } 1446 }
1446 1447
1447 } } // namespace v8::internal 1448 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler/ast-graph-builder.h » ('j') | src/ic/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698