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

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

Issue 12529008: Collect type feedback for fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ensure that not-null constraints are recomputed correctly Created 7 years, 9 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
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/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 #define DEOPT_REASON_ID_TO_TEXT(name) case kDeopt##name: return #name; 1373 #define DEOPT_REASON_ID_TO_TEXT(name) case kDeopt##name: return #name;
1374 DEOPT_REASONS(DEOPT_REASON_ID_TO_TEXT) 1374 DEOPT_REASONS(DEOPT_REASON_ID_TO_TEXT)
1375 #undef DEOPT_REASON_ID_TO_TEXT 1375 #undef DEOPT_REASON_ID_TO_TEXT
1376 default: 1376 default:
1377 UNREACHABLE(); 1377 UNREACHABLE();
1378 return ""; 1378 return "";
1379 } 1379 }
1380 } 1380 }
1381 1381
1382 1382
1383 static void DeoptimizeAt(const Code& optimized_code, uword pc) { 1383 void DeoptimizeAt(const Code& optimized_code, uword pc) {
srdjan 2013/03/18 18:54:35 ASSERT optimized code is optimized code?
Vyacheslav Egorov (Google) 2013/03/18 19:41:18 Done.
1384 intptr_t deopt_reason = kDeoptUnknown; 1384 intptr_t deopt_reason = kDeoptUnknown;
1385 const DeoptInfo& deopt_info = 1385 const DeoptInfo& deopt_info =
1386 DeoptInfo::Handle(optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason)); 1386 DeoptInfo::Handle(optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason));
1387 ASSERT(!deopt_info.IsNull()); 1387 ASSERT(!deopt_info.IsNull());
1388 const Function& function = Function::Handle(optimized_code.function()); 1388 const Function& function = Function::Handle(optimized_code.function());
1389 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); 1389 const Code& unoptimized_code = Code::Handle(function.unoptimized_code());
1390 ASSERT(!unoptimized_code.IsNull()); 1390 ASSERT(!unoptimized_code.IsNull());
1391 // The switch to unoptimized code may have already occured. 1391 // The switch to unoptimized code may have already occured.
1392 if (function.HasOptimizedCode()) { 1392 if (function.HasOptimizedCode()) {
1393 function.SwitchToUnoptimizedCode(); 1393 function.SwitchToUnoptimizedCode();
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 } else if (remainder < 0.0) { 1726 } else if (remainder < 0.0) {
1727 if (right < 0) { 1727 if (right < 0) {
1728 remainder -= right; 1728 remainder -= right;
1729 } else { 1729 } else {
1730 remainder += right; 1730 remainder += right;
1731 } 1731 }
1732 } 1732 }
1733 return remainder; 1733 return remainder;
1734 } 1734 }
1735 1735
1736
1737 // Update global type feedback recorded for a field recording the assignment
1738 // of the given value.
1739 // Arg0: Field object;
1740 // Arg1: Value that is being stored.
1741 DEFINE_RUNTIME_ENTRY(UpdateFieldCid, 2) {
1742 ASSERT(arguments.ArgCount() == kUpdateFieldCidRuntimeEntry.argument_count());
1743 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1744 const Object& value_cid = Object::Handle(arguments.ArgAt(1));
srdjan 2013/03/18 18:54:35 s/value_cid/value/ ?
Vyacheslav Egorov (Google) 2013/03/18 19:41:18 Done.
1745
1746 field.UpdateCid(Class::Handle(value_cid.clazz()).id());
1747 }
1748
1736 } // namespace dart 1749 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/compiler.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698