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

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

Issue 1150723005: [turbofan] Optimized lowering of DYNAMIC_GLOBAL lookup slot loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 6 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/compiler/js-typed-lowering.h » ('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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 ContextAccess const& ContextAccessOf(Operator const* op) { 87 ContextAccess const& ContextAccessOf(Operator const* op) {
88 DCHECK(op->opcode() == IrOpcode::kJSLoadContext || 88 DCHECK(op->opcode() == IrOpcode::kJSLoadContext ||
89 op->opcode() == IrOpcode::kJSStoreContext); 89 op->opcode() == IrOpcode::kJSStoreContext);
90 return OpParameter<ContextAccess>(op); 90 return OpParameter<ContextAccess>(op);
91 } 91 }
92 92
93 93
94 DynamicGlobalAccess::DynamicGlobalAccess(const Handle<String>& name, 94 DynamicGlobalAccess::DynamicGlobalAccess(const Handle<String>& name,
95 uint32_t check_bitset, 95 uint32_t check_bitset,
96 const VectorSlotPair& feedback,
96 ContextualMode mode) 97 ContextualMode mode)
97 : name_(name), check_bitset_(check_bitset), mode_(mode) { 98 : name_(name),
99 check_bitset_(check_bitset),
100 feedback_(feedback),
101 mode_(mode) {
98 DCHECK(check_bitset == kFullCheckRequired || check_bitset < 0x80000000U); 102 DCHECK(check_bitset == kFullCheckRequired || check_bitset < 0x80000000U);
99 } 103 }
100 104
101 105
102 bool operator==(DynamicGlobalAccess const& lhs, 106 bool operator==(DynamicGlobalAccess const& lhs,
103 DynamicGlobalAccess const& rhs) { 107 DynamicGlobalAccess const& rhs) {
104 UNIMPLEMENTED(); 108 UNIMPLEMENTED();
105 return true; 109 return true;
106 } 110 }
107 111
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 ContextAccess access(depth, index, false); 517 ContextAccess access(depth, index, false);
514 return new (zone()) Operator1<ContextAccess>( // -- 518 return new (zone()) Operator1<ContextAccess>( // --
515 IrOpcode::kJSStoreContext, // opcode 519 IrOpcode::kJSStoreContext, // opcode
516 Operator::kNoRead | Operator::kNoThrow, // flags 520 Operator::kNoRead | Operator::kNoThrow, // flags
517 "JSStoreContext", // name 521 "JSStoreContext", // name
518 2, 1, 1, 0, 1, 0, // counts 522 2, 1, 1, 0, 1, 0, // counts
519 access); // parameter 523 access); // parameter
520 } 524 }
521 525
522 526
523 const Operator* JSOperatorBuilder::LoadDynamicGlobal(const Handle<String>& name, 527 const Operator* JSOperatorBuilder::LoadDynamicGlobal(
524 uint32_t check_bitset, 528 const Handle<String>& name, uint32_t check_bitset,
525 ContextualMode mode) { 529 const VectorSlotPair& feedback, ContextualMode mode) {
526 DynamicGlobalAccess access(name, check_bitset, mode); 530 DynamicGlobalAccess access(name, check_bitset, feedback, mode);
527 return new (zone()) Operator1<DynamicGlobalAccess>( // -- 531 return new (zone()) Operator1<DynamicGlobalAccess>( // --
528 IrOpcode::kJSLoadDynamicGlobal, Operator::kNoProperties, // opcode 532 IrOpcode::kJSLoadDynamicGlobal, Operator::kNoProperties, // opcode
529 "JSLoadDynamicGlobal", // name 533 "JSLoadDynamicGlobal", // name
530 1, 1, 1, 1, 1, 2, // counts 534 1, 1, 1, 1, 1, 2, // counts
531 access); // parameter 535 access); // parameter
532 } 536 }
533 537
534 538
535 const Operator* JSOperatorBuilder::LoadDynamicContext( 539 const Operator* JSOperatorBuilder::LoadDynamicContext(
536 const Handle<String>& name, uint32_t check_bitset, size_t depth, 540 const Handle<String>& name, uint32_t check_bitset, size_t depth,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 return new (zone()) Operator1<Unique<String>>( // -- 583 return new (zone()) Operator1<Unique<String>>( // --
580 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode 584 IrOpcode::kJSCreateCatchContext, Operator::kNoProperties, // opcode
581 "JSCreateCatchContext", // name 585 "JSCreateCatchContext", // name
582 2, 1, 1, 1, 1, 2, // counts 586 2, 1, 1, 1, 1, 2, // counts
583 name); // parameter 587 name); // parameter
584 } 588 }
585 589
586 } // namespace compiler 590 } // namespace compiler
587 } // namespace internal 591 } // namespace internal
588 } // namespace v8 592 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698