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

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

Issue 1321993004: Vector ICs: ObjectLiteral refactoring for Oracle feedback (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ObjectLiteral refactorin. Created 5 years, 3 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
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_FULL_CODEGEN_H_ 5 #ifndef V8_FULL_CODEGEN_FULL_CODEGEN_H_
6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_ 6 #define V8_FULL_CODEGEN_FULL_CODEGEN_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/ast.h" 10 #include "src/ast.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 // Platform-specific code for loading variables. 544 // Platform-specific code for loading variables.
545 void EmitLoadGlobalCheckExtensions(VariableProxy* proxy, 545 void EmitLoadGlobalCheckExtensions(VariableProxy* proxy,
546 TypeofMode typeof_mode, Label* slow); 546 TypeofMode typeof_mode, Label* slow);
547 MemOperand ContextSlotOperandCheckExtensions(Variable* var, Label* slow); 547 MemOperand ContextSlotOperandCheckExtensions(Variable* var, Label* slow);
548 void EmitDynamicLookupFastCase(VariableProxy* proxy, TypeofMode typeof_mode, 548 void EmitDynamicLookupFastCase(VariableProxy* proxy, TypeofMode typeof_mode,
549 Label* slow, Label* done); 549 Label* slow, Label* done);
550 void EmitGlobalVariableLoad(VariableProxy* proxy, TypeofMode typeof_mode); 550 void EmitGlobalVariableLoad(VariableProxy* proxy, TypeofMode typeof_mode);
551 void EmitVariableLoad(VariableProxy* proxy, 551 void EmitVariableLoad(VariableProxy* proxy,
552 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); 552 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
553 553
554 void EmitAccessor(Expression* expression); 554 void EmitAccessor(ObjectLiteralProperty* property);
555 555
556 bool NeedsHoleCheckForLoad(VariableProxy* proxy); 556 bool NeedsHoleCheckForLoad(VariableProxy* proxy);
557 557
558 // Expects the arguments and the function already pushed. 558 // Expects the arguments and the function already pushed.
559 void EmitResolvePossiblyDirectEval(int arg_count); 559 void EmitResolvePossiblyDirectEval(int arg_count);
560 560
561 // Platform-specific support for allocating a new closure based on 561 // Platform-specific support for allocating a new closure based on
562 // the given function info. 562 // the given function info.
563 void EmitNewClosure(Handle<SharedFunctionInfo> info, bool pretenure); 563 void EmitNewClosure(Handle<SharedFunctionInfo> info, bool pretenure);
564 564
(...skipping 13 matching lines...) Expand all
578 // Expect receiver ('this' value), home_object and key on the stack. 578 // Expect receiver ('this' value), home_object and key on the stack.
579 void EmitKeyedSuperPropertyLoad(Property* expr); 579 void EmitKeyedSuperPropertyLoad(Property* expr);
580 580
581 // Load a value from a keyed property. 581 // Load a value from a keyed property.
582 // The receiver and the key is left on the stack by the IC. 582 // The receiver and the key is left on the stack by the IC.
583 void EmitKeyedPropertyLoad(Property* expr); 583 void EmitKeyedPropertyLoad(Property* expr);
584 584
585 // Adds the properties to the class (function) object and to its prototype. 585 // Adds the properties to the class (function) object and to its prototype.
586 // Expects the class (function) in the accumulator. The class (function) is 586 // Expects the class (function) in the accumulator. The class (function) is
587 // in the accumulator after installing all the properties. 587 // in the accumulator after installing all the properties.
588 void EmitClassDefineProperties(ClassLiteral* lit, int* used_store_slots); 588 void EmitClassDefineProperties(ClassLiteral* lit);
589 589
590 // Pushes the property key as a Name on the stack. 590 // Pushes the property key as a Name on the stack.
591 void EmitPropertyKey(ObjectLiteralProperty* property, BailoutId bailout_id); 591 void EmitPropertyKey(ObjectLiteralProperty* property, BailoutId bailout_id);
592 592
593 // Apply the compound assignment operator. Expects the left operand on top 593 // Apply the compound assignment operator. Expects the left operand on top
594 // of the stack and the right one in the accumulator. 594 // of the stack and the right one in the accumulator.
595 void EmitBinaryOp(BinaryOperation* expr, Token::Value op); 595 void EmitBinaryOp(BinaryOperation* expr, Token::Value op);
596 596
597 // Helper functions for generating inlined smi code for certain 597 // Helper functions for generating inlined smi code for certain
598 // binary operations. 598 // binary operations.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 // accumulator. 632 // accumulator.
633 void EmitKeyedPropertyAssignment(Assignment* expr); 633 void EmitKeyedPropertyAssignment(Assignment* expr);
634 634
635 static bool NeedsHomeObject(Expression* expr) { 635 static bool NeedsHomeObject(Expression* expr) {
636 return FunctionLiteral::NeedsHomeObject(expr); 636 return FunctionLiteral::NeedsHomeObject(expr);
637 } 637 }
638 638
639 // Adds the [[HomeObject]] to |initializer| if it is a FunctionLiteral. 639 // Adds the [[HomeObject]] to |initializer| if it is a FunctionLiteral.
640 // The value of the initializer is expected to be at the top of the stack. 640 // The value of the initializer is expected to be at the top of the stack.
641 // |offset| is the offset in the stack where the home object can be found. 641 // |offset| is the offset in the stack where the home object can be found.
642 void EmitSetHomeObjectIfNeeded( 642 void EmitSetHomeObject(Expression* initializer, int offset,
643 Expression* initializer, int offset, 643 FeedbackVectorICSlot slot);
644 FeedbackVectorICSlot slot = FeedbackVectorICSlot::Invalid()); 644
645 void EmitSetHomeObjectAccumulator(Expression* initializer, int offset,
646 FeedbackVectorICSlot slot);
645 647
646 void EmitLoadSuperConstructor(SuperCallReference* super_call_ref); 648 void EmitLoadSuperConstructor(SuperCallReference* super_call_ref);
647 649
648 void CallIC(Handle<Code> code, 650 void CallIC(Handle<Code> code,
649 TypeFeedbackId id = TypeFeedbackId::None()); 651 TypeFeedbackId id = TypeFeedbackId::None());
650 652
651 // Inside typeof reference errors are never thrown. 653 // Inside typeof reference errors are never thrown.
652 void CallLoadIC(TypeofMode typeof_mode, LanguageMode language_mode = SLOPPY, 654 void CallLoadIC(TypeofMode typeof_mode, LanguageMode language_mode = SLOPPY,
653 TypeFeedbackId id = TypeFeedbackId::None()); 655 TypeFeedbackId id = TypeFeedbackId::None());
654 void CallStoreIC(TypeFeedbackId id = TypeFeedbackId::None()); 656 void CallStoreIC(TypeFeedbackId id = TypeFeedbackId::None());
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 1083
1082 Address start_; 1084 Address start_;
1083 Address instruction_start_; 1085 Address instruction_start_;
1084 uint32_t length_; 1086 uint32_t length_;
1085 }; 1087 };
1086 1088
1087 1089
1088 } } // namespace v8::internal 1090 } } // namespace v8::internal
1089 1091
1090 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_ 1092 #endif // V8_FULL_CODEGEN_FULL_CODEGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698