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

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

Issue 1193313002: Vector ICs: Additional Turbofan support (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 6 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 | « no previous file | src/compiler/js-generic-lowering.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/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 for (AccessorTable::Iterator it = accessor_table.begin(); 1820 for (AccessorTable::Iterator it = accessor_table.begin();
1821 it != accessor_table.end(); ++it) { 1821 it != accessor_table.end(); ++it) {
1822 VisitForValue(it->first); 1822 VisitForValue(it->first);
1823 VisitForValueOrNull(it->second->getter); 1823 VisitForValueOrNull(it->second->getter);
1824 VectorSlotPair feedback_getter = CreateVectorSlotPair( 1824 VectorSlotPair feedback_getter = CreateVectorSlotPair(
1825 expr->SlotForHomeObject(it->second->getter, &store_slot_index)); 1825 expr->SlotForHomeObject(it->second->getter, &store_slot_index));
1826 BuildSetHomeObject(environment()->Top(), literal, it->second->getter, 1826 BuildSetHomeObject(environment()->Top(), literal, it->second->getter,
1827 feedback_getter); 1827 feedback_getter);
1828 VisitForValueOrNull(it->second->setter); 1828 VisitForValueOrNull(it->second->setter);
1829 VectorSlotPair feedback_setter = CreateVectorSlotPair( 1829 VectorSlotPair feedback_setter = CreateVectorSlotPair(
1830 expr->SlotForHomeObject(it->second->getter, &store_slot_index)); 1830 expr->SlotForHomeObject(it->second->setter, &store_slot_index));
1831 BuildSetHomeObject(environment()->Top(), literal, it->second->setter, 1831 BuildSetHomeObject(environment()->Top(), literal, it->second->setter,
1832 feedback_setter); 1832 feedback_setter);
1833 Node* setter = environment()->Pop(); 1833 Node* setter = environment()->Pop();
1834 Node* getter = environment()->Pop(); 1834 Node* getter = environment()->Pop();
1835 Node* name = environment()->Pop(); 1835 Node* name = environment()->Pop();
1836 Node* attr = jsgraph()->Constant(NONE); 1836 Node* attr = jsgraph()->Constant(NONE);
1837 const Operator* op = 1837 const Operator* op =
1838 javascript()->CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5); 1838 javascript()->CallRuntime(Runtime::kDefineAccessorPropertyUnchecked, 5);
1839 Node* call = NewNode(op, literal, name, getter, setter, attr); 1839 Node* call = NewNode(op, literal, name, getter, setter, attr);
1840 // This should not lazy deopt on a new literal. 1840 // This should not lazy deopt on a new literal.
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 javascript()->LoadNamed(MakeUnique(name), feedback, mode); 3497 javascript()->LoadNamed(MakeUnique(name), feedback, mode);
3498 Node* node = NewNode(op, object, BuildLoadFeedbackVector()); 3498 Node* node = NewNode(op, object, BuildLoadFeedbackVector());
3499 return Record(js_type_feedback_, node, feedback.slot()); 3499 return Record(js_type_feedback_, node, feedback.slot());
3500 } 3500 }
3501 3501
3502 3502
3503 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value, 3503 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value,
3504 const VectorSlotPair& feedback, 3504 const VectorSlotPair& feedback,
3505 TypeFeedbackId id) { 3505 TypeFeedbackId id) {
3506 const Operator* op = javascript()->StoreProperty(language_mode(), feedback); 3506 const Operator* op = javascript()->StoreProperty(language_mode(), feedback);
3507 Node* node = NewNode(op, object, key, value); 3507 Node* node = NewNode(op, object, key, value, BuildLoadFeedbackVector());
3508 if (FLAG_vector_stores) {
3509 return Record(js_type_feedback_, node, feedback.slot());
3510 }
3508 return Record(js_type_feedback_, node, id); 3511 return Record(js_type_feedback_, node, id);
3509 } 3512 }
3510 3513
3511 3514
3512 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name, 3515 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name,
3513 Node* value, 3516 Node* value,
3514 const VectorSlotPair& feedback, 3517 const VectorSlotPair& feedback,
3515 TypeFeedbackId id) { 3518 TypeFeedbackId id) {
3516 const Operator* op = 3519 const Operator* op =
3517 javascript()->StoreNamed(language_mode(), MakeUnique(name), feedback); 3520 javascript()->StoreNamed(language_mode(), MakeUnique(name), feedback);
3518 Node* node = NewNode(op, object, value); 3521 Node* node = NewNode(op, object, value, BuildLoadFeedbackVector());
3522 if (FLAG_vector_stores) {
3523 return Record(js_type_feedback_, node, feedback.slot());
3524 }
3519 return Record(js_type_feedback_, node, id); 3525 return Record(js_type_feedback_, node, id);
3520 } 3526 }
3521 3527
3522 3528
3523 Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object, 3529 Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object,
3524 Handle<Name> name, 3530 Handle<Name> name,
3525 const VectorSlotPair& feedback) { 3531 const VectorSlotPair& feedback) {
3526 Node* name_node = jsgraph()->Constant(name); 3532 Node* name_node = jsgraph()->Constant(name);
3527 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper, 3); 3533 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper, 3);
3528 Node* node = NewNode(op, receiver, home_object, name_node); 3534 Node* node = NewNode(op, receiver, home_object, name_node);
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
4128 // Phi does not exist yet, introduce one. 4134 // Phi does not exist yet, introduce one.
4129 value = NewPhi(inputs, value, control); 4135 value = NewPhi(inputs, value, control);
4130 value->ReplaceInput(inputs - 1, other); 4136 value->ReplaceInput(inputs - 1, other);
4131 } 4137 }
4132 return value; 4138 return value;
4133 } 4139 }
4134 4140
4135 } // namespace compiler 4141 } // namespace compiler
4136 } // namespace internal 4142 } // namespace internal
4137 } // namespace v8 4143 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698