| Index: src/full-codegen.cc
|
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc
|
| index db6da902c7868ee7d1b5a929d30e6d49512ee2c7..d489568ae08de6270fa62fb7da5bb1e8fcbed383 100644
|
| --- a/src/full-codegen.cc
|
| +++ b/src/full-codegen.cc
|
| @@ -384,14 +384,10 @@ unsigned FullCodeGenerator::EmitBackEdgeTable() {
|
| }
|
|
|
|
|
| -void FullCodeGenerator::InitializeFeedbackVector() {
|
| - int length = info_->function()->slot_count();
|
| - feedback_vector_ = isolate()->factory()->NewFixedArray(length, TENURED);
|
| - Handle<Object> sentinel = TypeFeedbackInfo::UninitializedSentinel(isolate());
|
| - // Ensure that it's safe to set without using a write barrier.
|
| - ASSERT_EQ(isolate()->heap()->uninitialized_symbol(), *sentinel);
|
| - for (int i = 0; i < length; i++) {
|
| - feedback_vector_->set(i, *sentinel, SKIP_WRITE_BARRIER);
|
| +void FullCodeGenerator::EnsureSlotContainsAllocationSite(int slot) {
|
| + Handle<FixedArray> vector = FeedbackVector();
|
| + if (!vector->get(slot)->IsAllocationSite()) {
|
| + vector->set(slot, *isolate()->factory()->NewAllocationSite());
|
| }
|
| }
|
|
|
| @@ -414,7 +410,6 @@ void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) {
|
| void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) {
|
| Handle<TypeFeedbackInfo> info = isolate()->factory()->NewTypeFeedbackInfo();
|
| info->set_ic_total_count(ic_total_count_);
|
| - info->set_feedback_vector(*FeedbackVector());
|
| ASSERT(!isolate()->heap()->InNewSpace(*info));
|
| code->set_type_feedback_info(*info);
|
| }
|
| @@ -1577,8 +1572,10 @@ void FullCodeGenerator::VisitNativeFunctionLiteral(
|
| Handle<Code> construct_stub = Handle<Code>(fun->shared()->construct_stub());
|
| bool is_generator = false;
|
| Handle<SharedFunctionInfo> shared =
|
| - isolate()->factory()->NewSharedFunctionInfo(name, literals, is_generator,
|
| - code, Handle<ScopeInfo>(fun->shared()->scope_info()));
|
| + isolate()->factory()->NewSharedFunctionInfo(
|
| + name, literals, is_generator,
|
| + code, Handle<ScopeInfo>(fun->shared()->scope_info()),
|
| + Handle<FixedArray>(fun->shared()->feedback_vector()));
|
| shared->set_construct_stub(*construct_stub);
|
|
|
| // Copy the function data to the shared function info.
|
|
|