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

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

Issue 641373002: Introduce FeedbackVectorSlot type - better than int. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/full-codegen.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 103
104 ContextAccess const& ContextAccessOf(Operator const* op) { 104 ContextAccess const& ContextAccessOf(Operator const* op) {
105 DCHECK(op->opcode() == IrOpcode::kJSLoadContext || 105 DCHECK(op->opcode() == IrOpcode::kJSLoadContext ||
106 op->opcode() == IrOpcode::kJSStoreContext); 106 op->opcode() == IrOpcode::kJSStoreContext);
107 return OpParameter<ContextAccess>(op); 107 return OpParameter<ContextAccess>(op);
108 } 108 }
109 109
110 110
111 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs) { 111 bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs) {
112 return lhs.slot() == rhs.slot() && lhs.vector().is_identical_to(rhs.vector()); 112 return lhs.slot().ToInt() == rhs.slot().ToInt() &&
113 lhs.vector().is_identical_to(rhs.vector());
113 } 114 }
114 115
115 116
116 size_t hash_value(VectorSlotPair const& p) { 117 size_t hash_value(VectorSlotPair const& p) {
117 // TODO(mvstanton): include the vector in the hash. 118 // TODO(mvstanton): include the vector in the hash.
118 base::hash<int> h; 119 base::hash<int> h;
119 return h(p.slot()); 120 return h(p.slot().ToInt());
120 } 121 }
121 122
122 123
123 bool operator==(LoadNamedParameters const& lhs, 124 bool operator==(LoadNamedParameters const& lhs,
124 LoadNamedParameters const& rhs) { 125 LoadNamedParameters const& rhs) {
125 return lhs.name() == rhs.name() && 126 return lhs.name() == rhs.name() &&
126 lhs.contextual_mode() == rhs.contextual_mode() && 127 lhs.contextual_mode() == rhs.contextual_mode() &&
127 lhs.feedback() == rhs.feedback(); 128 lhs.feedback() == rhs.feedback();
128 } 129 }
129 130
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 const Operator* JSOperatorBuilder::CreateCatchContext( 364 const Operator* JSOperatorBuilder::CreateCatchContext(
364 const Unique<String>& name) { 365 const Unique<String>& name) {
365 return new (zone()) Operator1<Unique<String>>(IrOpcode::kJSCreateCatchContext, 366 return new (zone()) Operator1<Unique<String>>(IrOpcode::kJSCreateCatchContext,
366 Operator::kNoProperties, 1, 1, 367 Operator::kNoProperties, 1, 1,
367 "JSCreateCatchContext", name); 368 "JSCreateCatchContext", name);
368 } 369 }
369 370
370 } // namespace compiler 371 } // namespace compiler
371 } // namespace internal 372 } // namespace internal
372 } // namespace v8 373 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698