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

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

Issue 1700993002: Remove strong mode support from property loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. 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/code-stubs-hydrogen.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 3552 matching lines...) Expand 10 before | Expand all | Expand 10 after
3563 return store; 3563 return store;
3564 } 3564 }
3565 } 3565 }
3566 UNREACHABLE(); 3566 UNREACHABLE();
3567 return nullptr; 3567 return nullptr;
3568 } 3568 }
3569 3569
3570 3570
3571 Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key, 3571 Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key,
3572 const VectorSlotPair& feedback) { 3572 const VectorSlotPair& feedback) {
3573 const Operator* op = javascript()->LoadProperty(language_mode(), feedback); 3573 const Operator* op = javascript()->LoadProperty(feedback);
3574 Node* node = NewNode(op, object, key, GetFunctionClosure()); 3574 Node* node = NewNode(op, object, key, GetFunctionClosure());
3575 return node; 3575 return node;
3576 } 3576 }
3577 3577
3578 3578
3579 Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name, 3579 Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name,
3580 const VectorSlotPair& feedback) { 3580 const VectorSlotPair& feedback) {
3581 const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback); 3581 const Operator* op = javascript()->LoadNamed(name, feedback);
3582 Node* node = NewNode(op, object, GetFunctionClosure()); 3582 Node* node = NewNode(op, object, GetFunctionClosure());
3583 return node; 3583 return node;
3584 } 3584 }
3585 3585
3586 3586
3587 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value, 3587 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value,
3588 const VectorSlotPair& feedback) { 3588 const VectorSlotPair& feedback) {
3589 const Operator* op = javascript()->StoreProperty(language_mode(), feedback); 3589 const Operator* op = javascript()->StoreProperty(language_mode(), feedback);
3590 Node* node = NewNode(op, object, key, value, GetFunctionClosure()); 3590 Node* node = NewNode(op, object, key, value, GetFunctionClosure());
3591 return node; 3591 return node;
3592 } 3592 }
3593 3593
3594 3594
3595 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name, 3595 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name,
3596 Node* value, 3596 Node* value,
3597 const VectorSlotPair& feedback) { 3597 const VectorSlotPair& feedback) {
3598 const Operator* op = 3598 const Operator* op =
3599 javascript()->StoreNamed(language_mode(), name, feedback); 3599 javascript()->StoreNamed(language_mode(), name, feedback);
3600 Node* node = NewNode(op, object, value, GetFunctionClosure()); 3600 Node* node = NewNode(op, object, value, GetFunctionClosure());
3601 return node; 3601 return node;
3602 } 3602 }
3603 3603
3604 3604
3605 Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object, 3605 Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object,
3606 Handle<Name> name, 3606 Handle<Name> name,
3607 const VectorSlotPair& feedback) { 3607 const VectorSlotPair& feedback) {
3608 Node* name_node = jsgraph()->Constant(name); 3608 Node* name_node = jsgraph()->Constant(name);
3609 Node* language = jsgraph()->Constant(language_mode());
3610 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper); 3609 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper);
3611 Node* node = NewNode(op, receiver, home_object, name_node, language); 3610 Node* node = NewNode(op, receiver, home_object, name_node);
3612 return node; 3611 return node;
3613 } 3612 }
3614 3613
3615 3614
3616 Node* AstGraphBuilder::BuildKeyedSuperLoad(Node* receiver, Node* home_object, 3615 Node* AstGraphBuilder::BuildKeyedSuperLoad(Node* receiver, Node* home_object,
3617 Node* key, 3616 Node* key,
3618 const VectorSlotPair& feedback) { 3617 const VectorSlotPair& feedback) {
3619 Node* language = jsgraph()->Constant(language_mode());
3620 const Operator* op = javascript()->CallRuntime(Runtime::kLoadKeyedFromSuper); 3618 const Operator* op = javascript()->CallRuntime(Runtime::kLoadKeyedFromSuper);
3621 Node* node = NewNode(op, receiver, home_object, key, language); 3619 Node* node = NewNode(op, receiver, home_object, key);
3622 return node; 3620 return node;
3623 } 3621 }
3624 3622
3625 3623
3626 Node* AstGraphBuilder::BuildKeyedSuperStore(Node* receiver, Node* home_object, 3624 Node* AstGraphBuilder::BuildKeyedSuperStore(Node* receiver, Node* home_object,
3627 Node* key, Node* value) { 3625 Node* key, Node* value) {
3628 Runtime::FunctionId function_id = is_strict(language_mode()) 3626 Runtime::FunctionId function_id = is_strict(language_mode())
3629 ? Runtime::kStoreKeyedToSuper_Strict 3627 ? Runtime::kStoreKeyedToSuper_Strict
3630 : Runtime::kStoreKeyedToSuper_Sloppy; 3628 : Runtime::kStoreKeyedToSuper_Sloppy;
3631 const Operator* op = javascript()->CallRuntime(function_id, 4); 3629 const Operator* op = javascript()->CallRuntime(function_id, 4);
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
4349 // Phi does not exist yet, introduce one. 4347 // Phi does not exist yet, introduce one.
4350 value = NewPhi(inputs, value, control); 4348 value = NewPhi(inputs, value, control);
4351 value->ReplaceInput(inputs - 1, other); 4349 value->ReplaceInput(inputs - 1, other);
4352 } 4350 }
4353 return value; 4351 return value;
4354 } 4352 }
4355 4353
4356 } // namespace compiler 4354 } // namespace compiler
4357 } // namespace internal 4355 } // namespace internal
4358 } // namespace v8 4356 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698