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

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

Issue 1054393003: Compress deopt instructions in memory using variable length encoding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix other architectures Created 5 years, 8 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/deopt_instructions.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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 UNREACHABLE(); 1429 UNREACHABLE();
1430 return ""; 1430 return "";
1431 } 1431 }
1432 } 1432 }
1433 1433
1434 1434
1435 void DeoptimizeAt(const Code& optimized_code, uword pc) { 1435 void DeoptimizeAt(const Code& optimized_code, uword pc) {
1436 ASSERT(optimized_code.is_optimized()); 1436 ASSERT(optimized_code.is_optimized());
1437 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown; 1437 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown;
1438 uint32_t deopt_flags = 0; 1438 uint32_t deopt_flags = 0;
1439 const DeoptInfo& deopt_info = DeoptInfo::Handle( 1439 const TypedData& deopt_info = TypedData::Handle(
1440 optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason, &deopt_flags)); 1440 optimized_code.GetDeoptInfoAtPc(pc, &deopt_reason, &deopt_flags));
1441 ASSERT(!deopt_info.IsNull()); 1441 ASSERT(!deopt_info.IsNull());
1442 const Function& function = Function::Handle(optimized_code.function()); 1442 const Function& function = Function::Handle(optimized_code.function());
1443 Compiler::EnsureUnoptimizedCode(Thread::Current(), function); 1443 Compiler::EnsureUnoptimizedCode(Thread::Current(), function);
1444 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); 1444 const Code& unoptimized_code = Code::Handle(function.unoptimized_code());
1445 ASSERT(!unoptimized_code.IsNull()); 1445 ASSERT(!unoptimized_code.IsNull());
1446 // The switch to unoptimized code may have already occurred. 1446 // The switch to unoptimized code may have already occurred.
1447 if (function.HasOptimizedCode()) { 1447 if (function.HasOptimizedCode()) {
1448 function.SwitchToUnoptimizedCode(); 1448 function.SwitchToUnoptimizedCode();
1449 } 1449 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1672 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1672 const intptr_t elm_size = old_data.ElementSizeInBytes();
1673 const TypedData& new_data = 1673 const TypedData& new_data =
1674 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1674 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1675 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1675 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1676 typed_data_cell.SetAt(0, new_data); 1676 typed_data_cell.SetAt(0, new_data);
1677 arguments.SetReturn(new_data); 1677 arguments.SetReturn(new_data);
1678 } 1678 }
1679 1679
1680 1680
1681 } // namespace dart 1681 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | runtime/vm/deopt_instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698