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

Side by Side Diff: src/compiler/js-builtin-reducer.cc

Issue 2609913002: [builtins] throw if TypedArray buffer is detached during iteration (Closed)
Patch Set: fix the other compiler error Created 3 years, 11 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/builtins/builtins-array.cc ('k') | test/mjsunit/es6/array-iterator-detached.js » ('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-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
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
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
OLDNEW
« no previous file with comments | « src/builtins/builtins-array.cc ('k') | test/mjsunit/es6/array-iterator-detached.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698