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

Side by Side Diff: src/compiler/osr.cc

Issue 1178403004: [turbofan] Use appropriate type for NodeId. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix useless static_cast. 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/node.h ('k') | src/compiler/schedule.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.h" 5 #include "src/compiler.h"
6 #include "src/compiler/all-nodes.h" 6 #include "src/compiler/all-nodes.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/control-reducer.h" 8 #include "src/compiler/control-reducer.h"
9 #include "src/compiler/frame.h" 9 #include "src/compiler/frame.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 26 matching lines...) Expand all
37 if (TRACE_COND) PrintF(__VA_ARGS__); \ 37 if (TRACE_COND) PrintF(__VA_ARGS__); \
38 } while (false) 38 } while (false)
39 39
40 40
41 // Peel outer loops and rewire the graph so that control reduction can 41 // Peel outer loops and rewire the graph so that control reduction can
42 // produce a properly formed graph. 42 // produce a properly formed graph.
43 static void PeelOuterLoopsForOsr(Graph* graph, CommonOperatorBuilder* common, 43 static void PeelOuterLoopsForOsr(Graph* graph, CommonOperatorBuilder* common,
44 Zone* tmp_zone, Node* dead, 44 Zone* tmp_zone, Node* dead,
45 LoopTree* loop_tree, LoopTree::Loop* osr_loop, 45 LoopTree* loop_tree, LoopTree::Loop* osr_loop,
46 Node* osr_normal_entry, Node* osr_loop_entry) { 46 Node* osr_normal_entry, Node* osr_loop_entry) {
47 const int original_count = graph->NodeCount(); 47 const size_t original_count = graph->NodeCount();
48 AllNodes all(tmp_zone, graph); 48 AllNodes all(tmp_zone, graph);
49 NodeVector tmp_inputs(tmp_zone); 49 NodeVector tmp_inputs(tmp_zone);
50 Node* sentinel = graph->NewNode(dead->op()); 50 Node* sentinel = graph->NewNode(dead->op());
51 51
52 // Make a copy of the graph for each outer loop. 52 // Make a copy of the graph for each outer loop.
53 ZoneVector<NodeVector*> copies(tmp_zone); 53 ZoneVector<NodeVector*> copies(tmp_zone);
54 for (LoopTree::Loop* loop = osr_loop->parent(); loop; loop = loop->parent()) { 54 for (LoopTree::Loop* loop = osr_loop->parent(); loop; loop = loop->parent()) {
55 void* stuff = tmp_zone->New(sizeof(NodeVector)); 55 void* stuff = tmp_zone->New(sizeof(NodeVector));
56 NodeVector* mapping = 56 NodeVector* mapping =
57 new (stuff) NodeVector(original_count, sentinel, tmp_zone); 57 new (stuff) NodeVector(original_count, sentinel, tmp_zone);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // the first spill slots. 348 // the first spill slots.
349 frame->ReserveSpillSlots(UnoptimizedFrameSlots()); 349 frame->ReserveSpillSlots(UnoptimizedFrameSlots());
350 // The frame needs to be adjusted by the number of unoptimized frame slots. 350 // The frame needs to be adjusted by the number of unoptimized frame slots.
351 frame->SetOsrStackSlotCount(static_cast<int>(UnoptimizedFrameSlots())); 351 frame->SetOsrStackSlotCount(static_cast<int>(UnoptimizedFrameSlots()));
352 } 352 }
353 353
354 354
355 } // namespace compiler 355 } // namespace compiler
356 } // namespace internal 356 } // namespace internal
357 } // namespace v8 357 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/schedule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698