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

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

Issue 1199493002: Revert relanded strong property access CL (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/code-stubs-hydrogen.cc ('k') | 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 3437 matching lines...) Expand 10 before | Expand all | Expand 10 after
3448 TypeFeedbackId id) { 3448 TypeFeedbackId id) {
3449 if (js_type_feedback) { 3449 if (js_type_feedback) {
3450 js_type_feedback->Record(node, id); 3450 js_type_feedback->Record(node, id);
3451 } 3451 }
3452 return node; 3452 return node;
3453 } 3453 }
3454 3454
3455 3455
3456 Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key, 3456 Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key,
3457 const ResolvedFeedbackSlot& feedback) { 3457 const ResolvedFeedbackSlot& feedback) {
3458 const Operator* op = javascript()->LoadProperty(feedback, language_mode()); 3458 const Operator* op = javascript()->LoadProperty(feedback);
3459 return Record(js_type_feedback_, 3459 return Record(js_type_feedback_,
3460 NewNode(op, object, key, GetFeedbackVector()), feedback.slot()); 3460 NewNode(op, object, key, GetFeedbackVector()), feedback.slot());
3461 } 3461 }
3462 3462
3463 3463
3464 Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name, 3464 Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name,
3465 const ResolvedFeedbackSlot& feedback, 3465 const ResolvedFeedbackSlot& feedback,
3466 ContextualMode mode) { 3466 ContextualMode mode) {
3467 const Operator* op = javascript()->LoadNamed(MakeUnique(name), feedback, 3467 const Operator* op =
3468 language_mode(), mode); 3468 javascript()->LoadNamed(MakeUnique(name), feedback, mode);
3469 return Record(js_type_feedback_, NewNode(op, object, GetFeedbackVector()), 3469 return Record(js_type_feedback_, NewNode(op, object, GetFeedbackVector()),
3470 feedback.slot()); 3470 feedback.slot());
3471 } 3471 }
3472 3472
3473 3473
3474 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value, 3474 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value,
3475 TypeFeedbackId id) { 3475 TypeFeedbackId id) {
3476 const Operator* op = javascript()->StoreProperty(language_mode()); 3476 const Operator* op = javascript()->StoreProperty(language_mode());
3477 return Record(js_type_feedback_, NewNode(op, object, key, value), id); 3477 return Record(js_type_feedback_, NewNode(op, object, key, value), id);
3478 } 3478 }
3479 3479
3480 3480
3481 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name, 3481 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name,
3482 Node* value, TypeFeedbackId id) { 3482 Node* value, TypeFeedbackId id) {
3483 const Operator* op = 3483 const Operator* op =
3484 javascript()->StoreNamed(language_mode(), MakeUnique(name)); 3484 javascript()->StoreNamed(language_mode(), MakeUnique(name));
3485 return Record(js_type_feedback_, NewNode(op, object, value), id); 3485 return Record(js_type_feedback_, NewNode(op, object, value), id);
3486 } 3486 }
3487 3487
3488 3488
3489 Node* AstGraphBuilder::BuildNamedSuperLoad( 3489 Node* AstGraphBuilder::BuildNamedSuperLoad(
3490 Node* receiver, Node* home_object, Handle<Name> name, 3490 Node* receiver, Node* home_object, Handle<Name> name,
3491 const ResolvedFeedbackSlot& feedback) { 3491 const ResolvedFeedbackSlot& feedback) {
3492 Node* name_node = jsgraph()->Constant(name); 3492 Node* name_node = jsgraph()->Constant(name);
3493 Node* language = jsgraph()->Constant(language_mode()); 3493 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper, 3);
3494 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper, 4); 3494 Node* value = NewNode(op, receiver, home_object, name_node);
3495 Node* value = NewNode(op, receiver, home_object, name_node, language);
3496 return Record(js_type_feedback_, value, feedback.slot()); 3495 return Record(js_type_feedback_, value, feedback.slot());
3497 } 3496 }
3498 3497
3499 3498
3500 Node* AstGraphBuilder::BuildKeyedSuperLoad( 3499 Node* AstGraphBuilder::BuildKeyedSuperLoad(
3501 Node* receiver, Node* home_object, Node* key, 3500 Node* receiver, Node* home_object, Node* key,
3502 const ResolvedFeedbackSlot& feedback) { 3501 const ResolvedFeedbackSlot& feedback) {
3503 Node* language = jsgraph()->Constant(language_mode());
3504 const Operator* op = 3502 const Operator* op =
3505 javascript()->CallRuntime(Runtime::kLoadKeyedFromSuper, 4); 3503 javascript()->CallRuntime(Runtime::kLoadKeyedFromSuper, 3);
3506 Node* value = NewNode(op, receiver, home_object, key, language); 3504 Node* value = NewNode(op, receiver, home_object, key);
3507 return Record(js_type_feedback_, value, feedback.slot()); 3505 return Record(js_type_feedback_, value, feedback.slot());
3508 } 3506 }
3509 3507
3510 3508
3511 Node* AstGraphBuilder::BuildKeyedSuperStore(Node* receiver, Node* home_object, 3509 Node* AstGraphBuilder::BuildKeyedSuperStore(Node* receiver, Node* home_object,
3512 Node* key, Node* value, 3510 Node* key, Node* value,
3513 TypeFeedbackId id) { 3511 TypeFeedbackId id) {
3514 Runtime::FunctionId function_id = is_strict(language_mode()) 3512 Runtime::FunctionId function_id = is_strict(language_mode())
3515 ? Runtime::kStoreKeyedToSuper_Strict 3513 ? Runtime::kStoreKeyedToSuper_Strict
3516 : Runtime::kStoreKeyedToSuper_Sloppy; 3514 : Runtime::kStoreKeyedToSuper_Sloppy;
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
4075 // Phi does not exist yet, introduce one. 4073 // Phi does not exist yet, introduce one.
4076 value = NewPhi(inputs, value, control); 4074 value = NewPhi(inputs, value, control);
4077 value->ReplaceInput(inputs - 1, other); 4075 value->ReplaceInput(inputs - 1, other);
4078 } 4076 }
4079 return value; 4077 return value;
4080 } 4078 }
4081 4079
4082 } // namespace compiler 4080 } // namespace compiler
4083 } // namespace internal 4081 } // namespace internal
4084 } // namespace v8 4082 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698