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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1670813005: Revert of Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/compiler/access-builder.cc ('k') | src/compiler/bytecode-graph-builder.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 3023 matching lines...) Expand 10 before | Expand all | Expand 10 after
3034 } 3034 }
3035 3035
3036 3036
3037 LanguageMode AstGraphBuilder::language_mode() const { 3037 LanguageMode AstGraphBuilder::language_mode() const {
3038 return info()->language_mode(); 3038 return info()->language_mode();
3039 } 3039 }
3040 3040
3041 3041
3042 VectorSlotPair AstGraphBuilder::CreateVectorSlotPair( 3042 VectorSlotPair AstGraphBuilder::CreateVectorSlotPair(
3043 FeedbackVectorSlot slot) const { 3043 FeedbackVectorSlot slot) const {
3044 return VectorSlotPair(handle(info()->closure()->feedback_vector()), slot); 3044 return VectorSlotPair(handle(info()->shared_info()->feedback_vector()), slot);
3045 } 3045 }
3046 3046
3047 3047
3048 void AstGraphBuilder::VisitRewritableAssignmentExpression( 3048 void AstGraphBuilder::VisitRewritableAssignmentExpression(
3049 RewritableAssignmentExpression* node) { 3049 RewritableAssignmentExpression* node) {
3050 Visit(node->expression()); 3050 Visit(node->expression());
3051 } 3051 }
3052 3052
3053 3053
3054 namespace { 3054 namespace {
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
3670 const Operator* op = 3670 const Operator* op =
3671 javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true); 3671 javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true);
3672 Node* native_context = NewNode(op, current_context()); 3672 Node* native_context = NewNode(op, current_context());
3673 return NewNode(javascript()->LoadContext(0, index, true), native_context); 3673 return NewNode(javascript()->LoadContext(0, index, true), native_context);
3674 } 3674 }
3675 3675
3676 3676
3677 Node* AstGraphBuilder::BuildLoadFeedbackVector() { 3677 Node* AstGraphBuilder::BuildLoadFeedbackVector() {
3678 if (!feedback_vector_.is_set()) { 3678 if (!feedback_vector_.is_set()) {
3679 Node* closure = GetFunctionClosure(); 3679 Node* closure = GetFunctionClosure();
3680 Node* literals = 3680 Node* shared = BuildLoadImmutableObjectField(
3681 BuildLoadImmutableObjectField(closure, JSFunction::kLiteralsOffset); 3681 closure, JSFunction::kSharedFunctionInfoOffset);
3682 Node* vector = BuildLoadImmutableObjectField( 3682 Node* vector = BuildLoadImmutableObjectField(
3683 literals, LiteralsArray::kFeedbackVectorOffset); 3683 shared, SharedFunctionInfo::kFeedbackVectorOffset);
3684 feedback_vector_.set(vector); 3684 feedback_vector_.set(vector);
3685 } 3685 }
3686 return feedback_vector_.get(); 3686 return feedback_vector_.get();
3687 } 3687 }
3688 3688
3689 3689
3690 Node* AstGraphBuilder::BuildToBoolean(Node* input, TypeFeedbackId feedback_id) { 3690 Node* AstGraphBuilder::BuildToBoolean(Node* input, TypeFeedbackId feedback_id) {
3691 if (Node* node = TryFastToBoolean(input)) return node; 3691 if (Node* node = TryFastToBoolean(input)) return node;
3692 ToBooleanHints hints; 3692 ToBooleanHints hints;
3693 if (!type_hint_analysis_ || 3693 if (!type_hint_analysis_ ||
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
4337 // Phi does not exist yet, introduce one. 4337 // Phi does not exist yet, introduce one.
4338 value = NewPhi(inputs, value, control); 4338 value = NewPhi(inputs, value, control);
4339 value->ReplaceInput(inputs - 1, other); 4339 value->ReplaceInput(inputs - 1, other);
4340 } 4340 }
4341 return value; 4341 return value;
4342 } 4342 }
4343 4343
4344 } // namespace compiler 4344 } // namespace compiler
4345 } // namespace internal 4345 } // namespace internal
4346 } // namespace v8 4346 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698