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

Side by Side Diff: src/compiler/js-operator.cc

Issue 2707873002: Collect type profile for DevTools. (Closed)
Patch Set: Delete unused var Created 3 years, 9 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 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/js-operator.h" 5 #include "src/compiler/js-operator.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/lazy-instance.h" 9 #include "src/base/lazy-instance.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 size_t hash_value(FeedbackParameter const& p) { 286 size_t hash_value(FeedbackParameter const& p) {
287 return base::hash_combine(p.feedback()); 287 return base::hash_combine(p.feedback());
288 } 288 }
289 289
290 std::ostream& operator<<(std::ostream& os, FeedbackParameter const& p) { 290 std::ostream& operator<<(std::ostream& os, FeedbackParameter const& p) {
291 return os; 291 return os;
292 } 292 }
293 293
294 FeedbackParameter const& FeedbackParameterOf(const Operator* op) { 294 FeedbackParameter const& FeedbackParameterOf(const Operator* op) {
295 DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral); 295 DCHECK(op->opcode() == IrOpcode::kJSStoreDataPropertyInLiteral ||
296 op->opcode() == IrOpcode::kJSCollectTypeProfile);
296 return OpParameter<FeedbackParameter>(op); 297 return OpParameter<FeedbackParameter>(op);
297 } 298 }
298 299
299 bool operator==(NamedAccess const& lhs, NamedAccess const& rhs) { 300 bool operator==(NamedAccess const& lhs, NamedAccess const& rhs) {
300 return lhs.name().location() == rhs.name().location() && 301 return lhs.name().location() == rhs.name().location() &&
301 lhs.language_mode() == rhs.language_mode() && 302 lhs.language_mode() == rhs.language_mode() &&
302 lhs.feedback() == rhs.feedback(); 303 lhs.feedback() == rhs.feedback();
303 } 304 }
304 305
305 306
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 const VectorSlotPair& feedback) { 697 const VectorSlotPair& feedback) {
697 FeedbackParameter parameters(feedback); 698 FeedbackParameter parameters(feedback);
698 return new (zone()) Operator1<FeedbackParameter>( // -- 699 return new (zone()) Operator1<FeedbackParameter>( // --
699 IrOpcode::kJSStoreDataPropertyInLiteral, 700 IrOpcode::kJSStoreDataPropertyInLiteral,
700 Operator::kNoThrow, // opcode 701 Operator::kNoThrow, // opcode
701 "JSStoreDataPropertyInLiteral", // name 702 "JSStoreDataPropertyInLiteral", // name
702 4, 1, 1, 0, 1, 0, // counts 703 4, 1, 1, 0, 1, 0, // counts
703 parameters); // parameter 704 parameters); // parameter
704 } 705 }
705 706
707 const Operator* JSOperatorBuilder::CollectTypeProfile(
708 const VectorSlotPair& feedback) {
709 FeedbackParameter parameters(feedback);
710 return new (zone()) Operator1<FeedbackParameter>( // --
711 IrOpcode::kJSCollectTypeProfile,
712 Operator::kNoThrow, // opcode
713 "JSCollectTypeProfile", // name
714 2, 1, 1, 0, 1, 0, // counts
715 parameters); // parameter
716 }
717
706 const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) { 718 const Operator* JSOperatorBuilder::ToBoolean(ToBooleanHints hints) {
707 // TODO(turbofan): Cache most important versions of this operator. 719 // TODO(turbofan): Cache most important versions of this operator.
708 return new (zone()) Operator1<ToBooleanHints>( //-- 720 return new (zone()) Operator1<ToBooleanHints>( //--
709 IrOpcode::kJSToBoolean, Operator::kPure, // opcode 721 IrOpcode::kJSToBoolean, Operator::kPure, // opcode
710 "JSToBoolean", // name 722 "JSToBoolean", // name
711 1, 0, 0, 1, 0, 0, // inputs/outputs 723 1, 0, 0, 1, 0, 0, // inputs/outputs
712 hints); // parameter 724 hints); // parameter
713 } 725 }
714 726
715 const Operator* JSOperatorBuilder::CallForwardVarargs( 727 const Operator* JSOperatorBuilder::CallForwardVarargs(
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- 1060 return new (zone()) Operator1<Handle<ScopeInfo>>( // --
1049 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode 1061 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
1050 "JSCreateScriptContext", // name 1062 "JSCreateScriptContext", // name
1051 1, 1, 1, 1, 1, 2, // counts 1063 1, 1, 1, 1, 1, 2, // counts
1052 scope_info); // parameter 1064 scope_info); // parameter
1053 } 1065 }
1054 1066
1055 } // namespace compiler 1067 } // namespace compiler
1056 } // namespace internal 1068 } // namespace internal
1057 } // namespace v8 1069 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698