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

Side by Side Diff: src/ast/ast.h

Issue 2333243004: CallConstruct also gets call count information if megamorphic. (Closed)
Patch Set: Compile/runtime fixes. Created 4 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_AST_AST_H_ 5 #ifndef V8_AST_AST_H_
6 #define V8_AST_AST_H_ 6 #define V8_AST_AST_H_
7 7
8 #include "src/ast/ast-types.h" 8 #include "src/ast/ast-types.h"
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/modules.h" 10 #include "src/ast/modules.h"
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 class CallNew final : public Expression { 1914 class CallNew final : public Expression {
1915 public: 1915 public:
1916 Expression* expression() const { return expression_; } 1916 Expression* expression() const { return expression_; }
1917 ZoneList<Expression*>* arguments() const { return arguments_; } 1917 ZoneList<Expression*>* arguments() const { return arguments_; }
1918 1918
1919 void set_expression(Expression* e) { expression_ = e; } 1919 void set_expression(Expression* e) { expression_ = e; }
1920 1920
1921 // Type feedback information. 1921 // Type feedback information.
1922 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec, 1922 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
1923 FeedbackVectorSlotCache* cache) { 1923 FeedbackVectorSlotCache* cache) {
1924 callnew_feedback_slot_ = spec->AddGeneralSlot(); 1924 // CallNew stores feedback in the exact same way as Call. We can
1925 // Construct calls have two slots, one right after the other. 1925 // piggyback on the type feedback infrastructure for calls.
1926 // The second slot stores the call count for monomorphic calls. 1926 callnew_feedback_slot_ = spec->AddCallICSlot();
1927 spec->AddGeneralSlot();
1928 } 1927 }
1929 1928
1930 FeedbackVectorSlot CallNewFeedbackSlot() { 1929 FeedbackVectorSlot CallNewFeedbackSlot() {
1931 DCHECK(!callnew_feedback_slot_.IsInvalid()); 1930 DCHECK(!callnew_feedback_slot_.IsInvalid());
1932 return callnew_feedback_slot_; 1931 return callnew_feedback_slot_;
1933 } 1932 }
1934 1933
1935 bool IsMonomorphic() const { return is_monomorphic_; } 1934 bool IsMonomorphic() const { return is_monomorphic_; }
1936 Handle<JSFunction> target() const { return target_; } 1935 Handle<JSFunction> target() const { return target_; }
1937 Handle<AllocationSite> allocation_site() const { 1936 Handle<AllocationSite> allocation_site() const {
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
3504 : NULL; \ 3503 : NULL; \
3505 } 3504 }
3506 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) 3505 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS)
3507 #undef DECLARE_NODE_FUNCTIONS 3506 #undef DECLARE_NODE_FUNCTIONS
3508 3507
3509 3508
3510 } // namespace internal 3509 } // namespace internal
3511 } // namespace v8 3510 } // namespace v8
3512 3511
3513 #endif // V8_AST_AST_H_ 3512 #endif // V8_AST_AST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698