OLD | NEW |
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-builtin-reducer.h" | 5 #include "src/compiler/js-builtin-reducer.h" |
6 | 6 |
7 #include "src/compilation-dependencies.h" | 7 #include "src/compilation-dependencies.h" |
8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 simplified()->LoadField(AccessBuilder::ForJSArrayBufferViewBuffer()), | 550 simplified()->LoadField(AccessBuilder::ForJSArrayBufferViewBuffer()), |
551 array, efalse0, if_false0); | 551 array, efalse0, if_false0); |
552 | 552 |
553 // See if we can skip the neutering check. | 553 // See if we can skip the neutering check. |
554 if (isolate()->IsArrayBufferNeuteringIntact()) { | 554 if (isolate()->IsArrayBufferNeuteringIntact()) { |
555 // Add a code dependency so we are deoptimized in case an ArrayBuffer | 555 // Add a code dependency so we are deoptimized in case an ArrayBuffer |
556 // gets neutered. | 556 // gets neutered. |
557 dependencies()->AssumePropertyCell( | 557 dependencies()->AssumePropertyCell( |
558 factory()->array_buffer_neutering_protector()); | 558 factory()->array_buffer_neutering_protector()); |
559 } else { | 559 } else { |
560 // Deoptimize if the array byuffer was neutered. | 560 // Deoptimize if the array buffer was neutered. |
561 Node* check1 = efalse0 = graph()->NewNode( | 561 Node* check1 = efalse0 = graph()->NewNode( |
562 simplified()->ArrayBufferWasNeutered(), buffer, efalse0, if_false0); | 562 simplified()->ArrayBufferWasNeutered(), buffer, efalse0, if_false0); |
563 check1 = graph()->NewNode(simplified()->BooleanNot(), check1); | 563 check1 = graph()->NewNode(simplified()->BooleanNot(), check1); |
564 efalse0 = | 564 efalse0 = |
565 graph()->NewNode(simplified()->CheckIf(), check1, efalse0, if_false0); | 565 graph()->NewNode(simplified()->CheckIf(), check1, efalse0, if_false0); |
566 } | 566 } |
567 | 567 |
568 Node* length = efalse0 = graph()->NewNode( | 568 Node* length = efalse0 = graph()->NewNode( |
569 simplified()->LoadField(AccessBuilder::ForJSTypedArrayLength()), array, | 569 simplified()->LoadField(AccessBuilder::ForJSTypedArrayLength()), array, |
570 efalse0, if_false0); | 570 efalse0, if_false0); |
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2066 return jsgraph()->simplified(); | 2066 return jsgraph()->simplified(); |
2067 } | 2067 } |
2068 | 2068 |
2069 JSOperatorBuilder* JSBuiltinReducer::javascript() const { | 2069 JSOperatorBuilder* JSBuiltinReducer::javascript() const { |
2070 return jsgraph()->javascript(); | 2070 return jsgraph()->javascript(); |
2071 } | 2071 } |
2072 | 2072 |
2073 } // namespace compiler | 2073 } // namespace compiler |
2074 } // namespace internal | 2074 } // namespace internal |
2075 } // namespace v8 | 2075 } // namespace v8 |
OLD | NEW |