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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 1364373003: Full code shouldn't embed the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. 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
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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 __ dd(length); 84 __ dd(length);
85 for (unsigned i = 0; i < length; ++i) { 85 for (unsigned i = 0; i < length; ++i) {
86 __ dd(back_edges_[i].id.ToInt()); 86 __ dd(back_edges_[i].id.ToInt());
87 __ dd(back_edges_[i].pc); 87 __ dd(back_edges_[i].pc);
88 __ dd(back_edges_[i].loop_depth); 88 __ dd(back_edges_[i].loop_depth);
89 } 89 }
90 return offset; 90 return offset;
91 } 91 }
92 92
93 93
94 void FullCodeGenerator::EnsureSlotContainsAllocationSite(
95 FeedbackVectorSlot slot) {
96 Handle<TypeFeedbackVector> vector = FeedbackVector();
97 if (!vector->Get(slot)->IsAllocationSite()) {
98 Handle<AllocationSite> allocation_site =
99 isolate()->factory()->NewAllocationSite();
100 vector->Set(slot, *allocation_site);
101 }
102 }
103
104
105 void FullCodeGenerator::EnsureSlotContainsAllocationSite(
106 FeedbackVectorICSlot slot) {
107 Handle<TypeFeedbackVector> vector = FeedbackVector();
108 if (!vector->Get(slot)->IsAllocationSite()) {
109 Handle<AllocationSite> allocation_site =
110 isolate()->factory()->NewAllocationSite();
111 vector->Set(slot, *allocation_site);
112 }
113 }
114
115
116 void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) { 94 void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) {
117 // Fill in the deoptimization information. 95 // Fill in the deoptimization information.
118 DCHECK(info_->HasDeoptimizationSupport() || bailout_entries_.is_empty()); 96 DCHECK(info_->HasDeoptimizationSupport() || bailout_entries_.is_empty());
119 if (!info_->HasDeoptimizationSupport()) return; 97 if (!info_->HasDeoptimizationSupport()) return;
120 int length = bailout_entries_.length(); 98 int length = bailout_entries_.length();
121 Handle<DeoptimizationOutputData> data = 99 Handle<DeoptimizationOutputData> data =
122 DeoptimizationOutputData::New(isolate(), length, TENURED); 100 DeoptimizationOutputData::New(isolate(), length, TENURED);
123 for (int i = 0; i < length; i++) { 101 for (int i = 0; i < length; i++) {
124 data->SetAstId(i, bailout_entries_[i].id); 102 data->SetAstId(i, bailout_entries_[i].id);
125 data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state)); 103 data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state));
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || 1608 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() ||
1631 var->initializer_position() >= proxy->position(); 1609 var->initializer_position() >= proxy->position();
1632 } 1610 }
1633 1611
1634 1612
1635 #undef __ 1613 #undef __
1636 1614
1637 1615
1638 } // namespace internal 1616 } // namespace internal
1639 } // namespace v8 1617 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698