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

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

Issue 1632993003: 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, 11 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 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 } 3047 }
3048 3048
3049 3049
3050 LanguageMode AstGraphBuilder::language_mode() const { 3050 LanguageMode AstGraphBuilder::language_mode() const {
3051 return info()->language_mode(); 3051 return info()->language_mode();
3052 } 3052 }
3053 3053
3054 3054
3055 VectorSlotPair AstGraphBuilder::CreateVectorSlotPair( 3055 VectorSlotPair AstGraphBuilder::CreateVectorSlotPair(
3056 FeedbackVectorSlot slot) const { 3056 FeedbackVectorSlot slot) const {
3057 return VectorSlotPair(handle(info()->closure()->feedback_vector()), slot); 3057 return VectorSlotPair(handle(info()->shared_info()->feedback_vector()), slot);
3058 } 3058 }
3059 3059
3060 3060
3061 void AstGraphBuilder::VisitRewritableAssignmentExpression( 3061 void AstGraphBuilder::VisitRewritableAssignmentExpression(
3062 RewritableAssignmentExpression* node) { 3062 RewritableAssignmentExpression* node) {
3063 Visit(node->expression()); 3063 Visit(node->expression());
3064 } 3064 }
3065 3065
3066 3066
3067 namespace { 3067 namespace {
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 const Operator* op = 3683 const Operator* op =
3684 javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true); 3684 javascript()->LoadContext(0, Context::NATIVE_CONTEXT_INDEX, true);
3685 Node* native_context = NewNode(op, current_context()); 3685 Node* native_context = NewNode(op, current_context());
3686 return NewNode(javascript()->LoadContext(0, index, true), native_context); 3686 return NewNode(javascript()->LoadContext(0, index, true), native_context);
3687 } 3687 }
3688 3688
3689 3689
3690 Node* AstGraphBuilder::BuildLoadFeedbackVector() { 3690 Node* AstGraphBuilder::BuildLoadFeedbackVector() {
3691 if (!feedback_vector_.is_set()) { 3691 if (!feedback_vector_.is_set()) {
3692 Node* closure = GetFunctionClosure(); 3692 Node* closure = GetFunctionClosure();
3693 Node* literals = 3693 Node* shared = BuildLoadImmutableObjectField(
3694 BuildLoadImmutableObjectField(closure, JSFunction::kLiteralsOffset); 3694 closure, JSFunction::kSharedFunctionInfoOffset);
3695 Node* vector = BuildLoadImmutableObjectField( 3695 Node* vector = BuildLoadImmutableObjectField(
3696 literals, LiteralsArray::kFeedbackVectorOffset); 3696 shared, SharedFunctionInfo::kFeedbackVectorOffset);
3697 feedback_vector_.set(vector); 3697 feedback_vector_.set(vector);
3698 } 3698 }
3699 return feedback_vector_.get(); 3699 return feedback_vector_.get();
3700 } 3700 }
3701 3701
3702 3702
3703 Node* AstGraphBuilder::BuildToBoolean(Node* input, TypeFeedbackId feedback_id) { 3703 Node* AstGraphBuilder::BuildToBoolean(Node* input, TypeFeedbackId feedback_id) {
3704 if (Node* node = TryFastToBoolean(input)) return node; 3704 if (Node* node = TryFastToBoolean(input)) return node;
3705 ToBooleanHints hints; 3705 ToBooleanHints hints;
3706 if (!type_hint_analysis_ || 3706 if (!type_hint_analysis_ ||
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
4340 // Phi does not exist yet, introduce one. 4340 // Phi does not exist yet, introduce one.
4341 value = NewPhi(inputs, value, control); 4341 value = NewPhi(inputs, value, control);
4342 value->ReplaceInput(inputs - 1, other); 4342 value->ReplaceInput(inputs - 1, other);
4343 } 4343 }
4344 return value; 4344 return value;
4345 } 4345 }
4346 4346
4347 } // namespace compiler 4347 } // namespace compiler
4348 } // namespace internal 4348 } // namespace internal
4349 } // namespace v8 4349 } // 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