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

Side by Side Diff: runtime/vm/intrinsifier.cc

Issue 2152683003: Revert "VM: Array bounds checks that don't deoptimize for precompiled code." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/precompiler.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // Class for intrinsifying functions. 4 // Class for intrinsifying functions.
5 5
6 #include "vm/assembler.h" 6 #include "vm/assembler.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 FlowGraph* flow_graph_; 366 FlowGraph* flow_graph_;
367 BlockEntryInstr* entry_; 367 BlockEntryInstr* entry_;
368 Instruction* current_; 368 Instruction* current_;
369 }; 369 };
370 370
371 371
372 static void PrepareIndexedOp(BlockBuilder* builder, 372 static void PrepareIndexedOp(BlockBuilder* builder,
373 Definition* array, 373 Definition* array,
374 Definition* index, 374 Definition* index,
375 intptr_t length_offset) { 375 intptr_t length_offset) {
376 TokenPosition token_pos = builder->TokenPos();
377 builder->AddInstruction(
378 new CheckSmiInstr(new Value(index),
379 Thread::kNoDeoptId,
380 token_pos));
381
376 Definition* length = builder->AddDefinition( 382 Definition* length = builder->AddDefinition(
377 new LoadFieldInstr(new Value(array), 383 new LoadFieldInstr(new Value(array),
378 length_offset, 384 length_offset,
379 Type::ZoneHandle(Type::SmiType()), 385 Type::ZoneHandle(Type::SmiType()),
380 TokenPosition::kNoSource)); 386 TokenPosition::kNoSource));
381 builder->AddInstruction( 387 builder->AddInstruction(
382 new CheckArrayBoundInstr(new Value(length), 388 new CheckArrayBoundInstr(new Value(length),
383 new Value(index), 389 new Value(index),
384 Thread::kNoDeoptId)); 390 Thread::kNoDeoptId));
385 } 391 }
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); 1233 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1228 BlockBuilder builder(flow_graph, normal_entry); 1234 BlockBuilder builder(flow_graph, normal_entry);
1229 1235
1230 return BuildInvokeMathCFunction(&builder, 1236 return BuildInvokeMathCFunction(&builder,
1231 MethodRecognizer::kDoubleRound); 1237 MethodRecognizer::kDoubleRound);
1232 } 1238 }
1233 #endif // !defined(TARGET_ARCH_DBC) 1239 #endif // !defined(TARGET_ARCH_DBC)
1234 1240
1235 1241
1236 } // namespace dart 1242 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698