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

Side by Side Diff: src/compiler/js-native-context-specialization.cc

Issue 1970123002: [turbofan] Deoptimize on access to neutered typed arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | test/mjsunit/compiler/optimized-float32array-length.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 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/js-native-context-specialization.h" 5 #include "src/compiler/js-native-context-specialization.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 graph()->NewNode(simplified()->LoadField( 257 graph()->NewNode(simplified()->LoadField(
258 AccessBuilder::ForJSArrayBufferBitField()), 258 AccessBuilder::ForJSArrayBufferBitField()),
259 this_buffer, this_effect, this_control); 259 this_buffer, this_effect, this_control);
260 Node* check = graph()->NewNode( 260 Node* check = graph()->NewNode(
261 machine()->Word32Equal(), 261 machine()->Word32Equal(),
262 graph()->NewNode(machine()->Word32And(), this_buffer_bit_field, 262 graph()->NewNode(machine()->Word32And(), this_buffer_bit_field,
263 jsgraph()->Int32Constant( 263 jsgraph()->Int32Constant(
264 1 << JSArrayBuffer::WasNeutered::kShift)), 264 1 << JSArrayBuffer::WasNeutered::kShift)),
265 jsgraph()->Int32Constant(0)); 265 jsgraph()->Int32Constant(0));
266 this_control = 266 this_control =
267 graph()->NewNode(common()->DeoptimizeIf(), check, frame_state, 267 graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state,
268 this_effect, this_control); 268 this_effect, this_control);
269 break; 269 break;
270 } 270 }
271 } 271 }
272 if (access_mode == AccessMode::kLoad && 272 if (access_mode == AccessMode::kLoad &&
273 access_info.holder().ToHandle(&holder)) { 273 access_info.holder().ToHandle(&holder)) {
274 this_receiver = jsgraph()->Constant(holder); 274 this_receiver = jsgraph()->Constant(holder);
275 } 275 }
276 Node* this_storage = this_receiver; 276 Node* this_storage = this_receiver;
277 if (!field_index.is_inobject()) { 277 if (!field_index.is_inobject()) {
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 } 1163 }
1164 1164
1165 1165
1166 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 1166 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
1167 return jsgraph()->simplified(); 1167 return jsgraph()->simplified();
1168 } 1168 }
1169 1169
1170 } // namespace compiler 1170 } // namespace compiler
1171 } // namespace internal 1171 } // namespace internal
1172 } // namespace v8 1172 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/optimized-float32array-length.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698