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

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

Issue 2614373002: [FeedbackVector] Infrastructure for literal arrays in the vector. (Closed)
Patch Set: Release compile fix. Created 3 years, 11 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/compiler/js-operator.h ('k') | src/crankshaft/hydrogen.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/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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 422
423 const CreateArrayParameters& CreateArrayParametersOf(const Operator* op) { 423 const CreateArrayParameters& CreateArrayParametersOf(const Operator* op) {
424 DCHECK_EQ(IrOpcode::kJSCreateArray, op->opcode()); 424 DCHECK_EQ(IrOpcode::kJSCreateArray, op->opcode());
425 return OpParameter<CreateArrayParameters>(op); 425 return OpParameter<CreateArrayParameters>(op);
426 } 426 }
427 427
428 428
429 bool operator==(CreateClosureParameters const& lhs, 429 bool operator==(CreateClosureParameters const& lhs,
430 CreateClosureParameters const& rhs) { 430 CreateClosureParameters const& rhs) {
431 return lhs.pretenure() == rhs.pretenure() && 431 return lhs.pretenure() == rhs.pretenure() &&
432 lhs.feedback() == rhs.feedback() &&
432 lhs.shared_info().location() == rhs.shared_info().location(); 433 lhs.shared_info().location() == rhs.shared_info().location();
433 } 434 }
434 435
435 436
436 bool operator!=(CreateClosureParameters const& lhs, 437 bool operator!=(CreateClosureParameters const& lhs,
437 CreateClosureParameters const& rhs) { 438 CreateClosureParameters const& rhs) {
438 return !(lhs == rhs); 439 return !(lhs == rhs);
439 } 440 }
440 441
441 442
442 size_t hash_value(CreateClosureParameters const& p) { 443 size_t hash_value(CreateClosureParameters const& p) {
443 return base::hash_combine(p.pretenure(), p.shared_info().location()); 444 return base::hash_combine(p.pretenure(), p.shared_info().location(),
445 p.feedback());
444 } 446 }
445 447
446 448
447 std::ostream& operator<<(std::ostream& os, CreateClosureParameters const& p) { 449 std::ostream& operator<<(std::ostream& os, CreateClosureParameters const& p) {
448 return os << p.pretenure() << ", " << Brief(*p.shared_info()); 450 return os << p.pretenure() << ", " << Brief(*p.shared_info());
449 } 451 }
450 452
451 453
452 const CreateClosureParameters& CreateClosureParametersOf(const Operator* op) { 454 const CreateClosureParameters& CreateClosureParametersOf(const Operator* op) {
453 DCHECK_EQ(IrOpcode::kJSCreateClosure, op->opcode()); 455 DCHECK_EQ(IrOpcode::kJSCreateClosure, op->opcode());
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 // constructor, new_target, arg1, ..., argN 907 // constructor, new_target, arg1, ..., argN
906 int const value_input_count = static_cast<int>(arity) + 2; 908 int const value_input_count = static_cast<int>(arity) + 2;
907 CreateArrayParameters parameters(arity, site); 909 CreateArrayParameters parameters(arity, site);
908 return new (zone()) Operator1<CreateArrayParameters>( // -- 910 return new (zone()) Operator1<CreateArrayParameters>( // --
909 IrOpcode::kJSCreateArray, Operator::kNoProperties, // opcode 911 IrOpcode::kJSCreateArray, Operator::kNoProperties, // opcode
910 "JSCreateArray", // name 912 "JSCreateArray", // name
911 value_input_count, 1, 1, 1, 1, 2, // counts 913 value_input_count, 1, 1, 1, 1, 2, // counts
912 parameters); // parameter 914 parameters); // parameter
913 } 915 }
914 916
915
916 const Operator* JSOperatorBuilder::CreateClosure( 917 const Operator* JSOperatorBuilder::CreateClosure(
917 Handle<SharedFunctionInfo> shared_info, PretenureFlag pretenure) { 918 Handle<SharedFunctionInfo> shared_info, VectorSlotPair const& feedback,
918 CreateClosureParameters parameters(shared_info, pretenure); 919 PretenureFlag pretenure) {
920 CreateClosureParameters parameters(shared_info, feedback, pretenure);
919 return new (zone()) Operator1<CreateClosureParameters>( // -- 921 return new (zone()) Operator1<CreateClosureParameters>( // --
920 IrOpcode::kJSCreateClosure, Operator::kNoThrow, // opcode 922 IrOpcode::kJSCreateClosure, Operator::kNoThrow, // opcode
921 "JSCreateClosure", // name 923 "JSCreateClosure", // name
922 0, 1, 1, 1, 1, 0, // counts 924 0, 1, 1, 1, 1, 0, // counts
923 parameters); // parameter 925 parameters); // parameter
924 } 926 }
925 927
926 const Operator* JSOperatorBuilder::CreateLiteralArray( 928 const Operator* JSOperatorBuilder::CreateLiteralArray(
927 Handle<ConstantElementsPair> constant_elements, int literal_flags, 929 Handle<ConstantElementsPair> constant_elements, int literal_flags,
928 int literal_index, int number_of_elements) { 930 int literal_index, int number_of_elements) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- 1004 return new (zone()) Operator1<Handle<ScopeInfo>>( // --
1003 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode 1005 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
1004 "JSCreateScriptContext", // name 1006 "JSCreateScriptContext", // name
1005 1, 1, 1, 1, 1, 2, // counts 1007 1, 1, 1, 1, 1, 2, // counts
1006 scope_info); // parameter 1008 scope_info); // parameter
1007 } 1009 }
1008 1010
1009 } // namespace compiler 1011 } // namespace compiler
1010 } // namespace internal 1012 } // namespace internal
1011 } // namespace v8 1013 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698