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

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

Issue 619903002: Generalize bounds checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/flow_graph_range_analysis.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 4
5 #include "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 default: 1400 default:
1401 UNREACHABLE(); 1401 UNREACHABLE();
1402 return ""; 1402 return "";
1403 } 1403 }
1404 } 1404 }
1405 1405
1406 1406
1407 void DeoptimizeAt(const Code& optimized_code, uword pc) { 1407 void DeoptimizeAt(const Code& optimized_code, uword pc) {
1408 ASSERT(optimized_code.is_optimized()); 1408 ASSERT(optimized_code.is_optimized());
1409 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown; 1409 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown;
1410 const DeoptInfo& deopt_info = 1410 uint32_t deopt_flags = 0;
1411 DeoptInfo::Handle(optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason)); 1411 const DeoptInfo& deopt_info = DeoptInfo::Handle(
1412 optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason, &deopt_flags));
1412 ASSERT(!deopt_info.IsNull()); 1413 ASSERT(!deopt_info.IsNull());
1413 const Function& function = Function::Handle(optimized_code.function()); 1414 const Function& function = Function::Handle(optimized_code.function());
1414 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); 1415 const Code& unoptimized_code = Code::Handle(function.unoptimized_code());
1415 ASSERT(!unoptimized_code.IsNull()); 1416 ASSERT(!unoptimized_code.IsNull());
1416 // The switch to unoptimized code may have already occurred. 1417 // The switch to unoptimized code may have already occurred.
1417 if (function.HasOptimizedCode()) { 1418 if (function.HasOptimizedCode()) {
1418 function.SwitchToUnoptimizedCode(); 1419 function.SwitchToUnoptimizedCode();
1419 } 1420 }
1420 // Patch call site (lazy deoptimization is quite rare, patching it twice 1421 // Patch call site (lazy deoptimization is quite rare, patching it twice
1421 // is not a performance issue). 1422 // is not a performance issue).
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 field.RecordStore(value); 1627 field.RecordStore(value);
1627 } 1628 }
1628 1629
1629 1630
1630 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { 1631 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
1631 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); 1632 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1632 field.EvaluateInitializer(); 1633 field.EvaluateInitializer();
1633 } 1634 }
1634 1635
1635 } // namespace dart 1636 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/flow_graph_range_analysis.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698