OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/escape-analysis-reducer.h" | 5 #include "src/compiler/escape-analysis-reducer.h" |
6 | 6 |
7 #include "src/compiler/all-nodes.h" | 7 #include "src/compiler/all-nodes.h" |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/counters.h" | 9 #include "src/counters.h" |
10 | 10 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 } | 320 } |
321 TRACE("Reducing State Input #%d (%s)\n", input->id(), | 321 TRACE("Reducing State Input #%d (%s)\n", input->id(), |
322 input->op()->mnemonic()); | 322 input->op()->mnemonic()); |
323 Node* clone = nullptr; | 323 Node* clone = nullptr; |
324 if (input->opcode() == IrOpcode::kFinishRegion || | 324 if (input->opcode() == IrOpcode::kFinishRegion || |
325 input->opcode() == IrOpcode::kAllocate) { | 325 input->opcode() == IrOpcode::kAllocate) { |
326 if (escape_analysis()->IsVirtual(input)) { | 326 if (escape_analysis()->IsVirtual(input)) { |
327 if (escape_analysis()->IsCyclicObjectState(effect, input)) { | 327 if (escape_analysis()->IsCyclicObjectState(effect, input)) { |
328 // TODO(mstarzinger): Represent cyclic object states differently to | 328 // TODO(mstarzinger): Represent cyclic object states differently to |
329 // ensure the scheduler can properly handle such object states. | 329 // ensure the scheduler can properly handle such object states. |
330 FATAL("Cyclic object state detected by escape analysis."); | 330 compilation_failed_ = true; |
| 331 return nullptr; |
331 } | 332 } |
332 if (Node* object_state = | 333 if (Node* object_state = |
333 escape_analysis()->GetOrCreateObjectState(effect, input)) { | 334 escape_analysis()->GetOrCreateObjectState(effect, input)) { |
334 if (node_multiused || (multiple_users && !already_cloned)) { | 335 if (node_multiused || (multiple_users && !already_cloned)) { |
335 TRACE("Cloning #%d", node->id()); | 336 TRACE("Cloning #%d", node->id()); |
336 node = clone = jsgraph()->graph()->CloneNode(node); | 337 node = clone = jsgraph()->graph()->CloneNode(node); |
337 TRACE(" to #%d\n", node->id()); | 338 TRACE(" to #%d\n", node->id()); |
338 node_multiused = false; | 339 node_multiused = false; |
339 already_cloned = true; | 340 already_cloned = true; |
340 } | 341 } |
(...skipping 20 matching lines...) Expand all Loading... |
361 } | 362 } |
362 } | 363 } |
363 #endif // DEBUG | 364 #endif // DEBUG |
364 } | 365 } |
365 | 366 |
366 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); } | 367 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); } |
367 | 368 |
368 } // namespace compiler | 369 } // namespace compiler |
369 } // namespace internal | 370 } // namespace internal |
370 } // namespace v8 | 371 } // namespace v8 |
OLD | NEW |