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

Side by Side Diff: src/full-codegen.h

Issue 638623002: Keyed stores to super where key is a name. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: All platforms + CR feedback Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/full-codegen-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_FULL_CODEGEN_H_ 5 #ifndef V8_FULL_CODEGEN_H_
6 #define V8_FULL_CODEGEN_H_ 6 #define V8_FULL_CODEGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 511
512 // Expects the arguments and the function already pushed. 512 // Expects the arguments and the function already pushed.
513 void EmitResolvePossiblyDirectEval(int arg_count); 513 void EmitResolvePossiblyDirectEval(int arg_count);
514 514
515 // Platform-specific support for allocating a new closure based on 515 // Platform-specific support for allocating a new closure based on
516 // the given function info. 516 // the given function info.
517 void EmitNewClosure(Handle<SharedFunctionInfo> info, bool pretenure); 517 void EmitNewClosure(Handle<SharedFunctionInfo> info, bool pretenure);
518 518
519 // Platform-specific support for compiling assignments. 519 // Platform-specific support for compiling assignments.
520 520
521 // Left-hand side can only be a property, a global or a (parameter or local)
522 // slot.
523 enum LhsKind {
Igor Sheludko 2014/10/09 11:07:20 Since we make the enum "public" maybe "LvalueKind"
524 VARIABLE,
525 NAMED_PROPERTY,
526 KEYED_PROPERTY,
527 NAMED_SUPER_PROPERTY,
528 KEYED_SUPER_PROPERTY
529 };
530
531 static LhsKind GetAssignType(Property* property) {
532 if (property == NULL) return VARIABLE;
533 bool super_access = property->IsSuperAccess();
534 return (property->key()->IsPropertyName())
535 ? (super_access ? NAMED_SUPER_PROPERTY : NAMED_PROPERTY)
536 : (super_access ? KEYED_SUPER_PROPERTY : KEYED_PROPERTY);
537 }
538
521 // Load a value from a named property. 539 // Load a value from a named property.
522 // The receiver is left on the stack by the IC. 540 // The receiver is left on the stack by the IC.
523 void EmitNamedPropertyLoad(Property* expr); 541 void EmitNamedPropertyLoad(Property* expr);
524 542
525 // Load a value from super.named property. 543 // Load a value from super.named property.
526 // Expect receiver ('this' value) and home_object on the stack. 544 // Expect receiver ('this' value) and home_object on the stack.
527 void EmitNamedSuperPropertyLoad(Property* expr); 545 void EmitNamedSuperPropertyLoad(Property* expr);
528 546
529 // Load a value from super[keyed] property. 547 // Load a value from super[keyed] property.
530 // Expect receiver ('this' value), home_object and key on the stack. 548 // Expect receiver ('this' value), home_object and key on the stack.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 MemOperand location); 580 MemOperand location);
563 581
564 // Complete a named property assignment. The receiver is expected on top 582 // Complete a named property assignment. The receiver is expected on top
565 // of the stack and the right-hand-side value in the accumulator. 583 // of the stack and the right-hand-side value in the accumulator.
566 void EmitNamedPropertyAssignment(Assignment* expr); 584 void EmitNamedPropertyAssignment(Assignment* expr);
567 585
568 // Complete a super named property assignment. The right-hand-side value 586 // Complete a super named property assignment. The right-hand-side value
569 // is expected in accumulator. 587 // is expected in accumulator.
570 void EmitNamedSuperPropertyStore(Property* prop); 588 void EmitNamedSuperPropertyStore(Property* prop);
571 589
590 // Complete a super named property assignment. The right-hand-side value
591 // is expected in accumulator.
592 void EmitKeyedSuperPropertyStore(Property* prop);
593
572 // Complete a keyed property assignment. The receiver and key are 594 // Complete a keyed property assignment. The receiver and key are
573 // expected on top of the stack and the right-hand-side value in the 595 // expected on top of the stack and the right-hand-side value in the
574 // accumulator. 596 // accumulator.
575 void EmitKeyedPropertyAssignment(Assignment* expr); 597 void EmitKeyedPropertyAssignment(Assignment* expr);
576 598
577 void EmitLoadHomeObject(SuperReference* expr); 599 void EmitLoadHomeObject(SuperReference* expr);
578 600
579 void CallIC(Handle<Code> code, 601 void CallIC(Handle<Code> code,
580 TypeFeedbackId id = TypeFeedbackId::None()); 602 TypeFeedbackId id = TypeFeedbackId::None());
581 603
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 980
959 Address start_; 981 Address start_;
960 Address instruction_start_; 982 Address instruction_start_;
961 uint32_t length_; 983 uint32_t length_;
962 }; 984 };
963 985
964 986
965 } } // namespace v8::internal 987 } } // namespace v8::internal
966 988
967 #endif // V8_FULL_CODEGEN_H_ 989 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698