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

Side by Side Diff: src/compiler/generic-node-inl.h

Issue 646943007: Fix Win64 build after r24896 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_COMPILER_GENERIC_NODE_INL_H_ 5 #ifndef V8_COMPILER_GENERIC_NODE_INL_H_
6 #define V8_COMPILER_GENERIC_NODE_INL_H_ 6 #define V8_COMPILER_GENERIC_NODE_INL_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/generic-graph.h" 10 #include "src/compiler/generic-graph.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 template <class B, class S> 229 template <class B, class S>
230 inline bool GenericNode<B, S>::OwnedBy(GenericNode* owner) const { 230 inline bool GenericNode<B, S>::OwnedBy(GenericNode* owner) const {
231 return first_use_ != NULL && first_use_->from == owner && 231 return first_use_ != NULL && first_use_->from == owner &&
232 first_use_->next == NULL; 232 first_use_->next == NULL;
233 } 233 }
234 234
235 template <class B, class S> 235 template <class B, class S>
236 S* GenericNode<B, S>::New(GenericGraphBase* graph, int input_count, S** inputs, 236 S* GenericNode<B, S>::New(GenericGraphBase* graph, int input_count, S** inputs,
237 bool has_extensible_inputs) { 237 bool has_extensible_inputs) {
238 size_t node_size = sizeof(GenericNode); 238 size_t node_size = sizeof(GenericNode);
239 size_t reserve_input_count = 239 int reserve_input_count = has_extensible_inputs ? kDefaultReservedInputs : 0;
240 has_extensible_inputs ? kDefaultReservedInputs : 0;
241 size_t inputs_size = (input_count + reserve_input_count) * sizeof(Input); 240 size_t inputs_size = (input_count + reserve_input_count) * sizeof(Input);
242 size_t uses_size = input_count * sizeof(Use); 241 size_t uses_size = input_count * sizeof(Use);
243 int size = static_cast<int>(node_size + inputs_size + uses_size); 242 int size = static_cast<int>(node_size + inputs_size + uses_size);
244 Zone* zone = graph->zone(); 243 Zone* zone = graph->zone();
245 void* buffer = zone->New(size); 244 void* buffer = zone->New(size);
246 S* result = new (buffer) S(graph, input_count, reserve_input_count); 245 S* result = new (buffer) S(graph, input_count, reserve_input_count);
247 Input* input = 246 Input* input =
248 reinterpret_cast<Input*>(reinterpret_cast<char*>(buffer) + node_size); 247 reinterpret_cast<Input*>(reinterpret_cast<char*>(buffer) + node_size);
249 Use* use = 248 Use* use =
250 reinterpret_cast<Use*>(reinterpret_cast<char*>(input) + inputs_size); 249 reinterpret_cast<Use*>(reinterpret_cast<char*>(input) + inputs_size);
251 250
252 for (int current = 0; current < input_count; ++current) { 251 for (int current = 0; current < input_count; ++current) {
253 GenericNode* to = *inputs++; 252 GenericNode* to = *inputs++;
254 input->to = to; 253 input->to = to;
255 input->use = use; 254 input->use = use;
256 use->input_index = current; 255 use->input_index = current;
257 use->from = result; 256 use->from = result;
258 to->AppendUse(use); 257 to->AppendUse(use);
259 ++use; 258 ++use;
260 ++input; 259 ++input;
261 } 260 }
262 return result; 261 return result;
263 } 262 }
264 } 263 }
265 } 264 }
266 } // namespace v8::internal::compiler 265 } // namespace v8::internal::compiler
267 266
268 #endif // V8_COMPILER_GENERIC_NODE_INL_H_ 267 #endif // V8_COMPILER_GENERIC_NODE_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698