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

Side by Side Diff: vm/code_generator.cc

Issue 9791048: - Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/code_descriptors_test.cc ('k') | vm/code_index_table_test.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 4
5 #include "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/code_index_table.h"
8 #include "vm/code_patcher.h" 7 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 8 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
11 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
12 #include "vm/debugger.h" 11 #include "vm/debugger.h"
13 #include "vm/exceptions.h" 12 #include "vm/exceptions.h"
14 #include "vm/object_store.h" 13 #include "vm/object_store.h"
15 #include "vm/message.h" 14 #include "vm/message.h"
16 #include "vm/resolver.h" 15 #include "vm/resolver.h"
17 #include "vm/runtime_entry.h" 16 #include "vm/runtime_entry.h"
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 // Find the node id of the deoptimization point and find the continuation 1279 // Find the node id of the deoptimization point and find the continuation
1281 // pc in the unoptimized code. 1280 // pc in the unoptimized code.
1282 // Since both unoptimized and optimized code have the same layout, we need only 1281 // Since both unoptimized and optimized code have the same layout, we need only
1283 // to patch the pc of the Dart frame and to disable/enable appropriate code. 1282 // to patch the pc of the Dart frame and to disable/enable appropriate code.
1284 DEFINE_RUNTIME_ENTRY(Deoptimize, 1) { 1283 DEFINE_RUNTIME_ENTRY(Deoptimize, 1) {
1285 ASSERT(arguments.Count() == kDeoptimizeRuntimeEntry.argument_count()); 1284 ASSERT(arguments.Count() == kDeoptimizeRuntimeEntry.argument_count());
1286 const Smi& deoptimization_reason_id = Smi::CheckedHandle(arguments.At(0)); 1285 const Smi& deoptimization_reason_id = Smi::CheckedHandle(arguments.At(0));
1287 DartFrameIterator iterator; 1286 DartFrameIterator iterator;
1288 DartFrame* caller_frame = iterator.NextFrame(); 1287 DartFrame* caller_frame = iterator.NextFrame();
1289 ASSERT(caller_frame != NULL); 1288 ASSERT(caller_frame != NULL);
1290 CodeIndexTable* ci_table = isolate->code_index_table(); 1289 const Code& optimized_code = Code::Handle(caller_frame->LookupDartCode());
1291 const Code& optimized_code =
1292 Code::Handle(ci_table->LookupCode(caller_frame->pc()));
1293 const Function& function = Function::Handle(optimized_code.function()); 1290 const Function& function = Function::Handle(optimized_code.function());
1294 ASSERT(!function.IsNull()); 1291 ASSERT(!function.IsNull());
1295 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); 1292 const Code& unoptimized_code = Code::Handle(function.unoptimized_code());
1296 ASSERT(!optimized_code.IsNull() && optimized_code.is_optimized()); 1293 ASSERT(!optimized_code.IsNull() && optimized_code.is_optimized());
1297 ASSERT(!unoptimized_code.IsNull() && !unoptimized_code.is_optimized()); 1294 ASSERT(!unoptimized_code.IsNull() && !unoptimized_code.is_optimized());
1298 const PcDescriptors& descriptors = 1295 const PcDescriptors& descriptors =
1299 PcDescriptors::Handle(optimized_code.pc_descriptors()); 1296 PcDescriptors::Handle(optimized_code.pc_descriptors());
1300 ASSERT(!descriptors.IsNull()); 1297 ASSERT(!descriptors.IsNull());
1301 // Locate node id at deoptimization point inside optimized code. 1298 // Locate node id at deoptimization point inside optimized code.
1302 intptr_t deopt_node_id = AstNode::kNoId; 1299 intptr_t deopt_node_id = AstNode::kNoId;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 } 1429 }
1433 } 1430 }
1434 } 1431 }
1435 // The cache is null terminated, therefore the loop above should never 1432 // The cache is null terminated, therefore the loop above should never
1436 // terminate by itself. 1433 // terminate by itself.
1437 UNREACHABLE(); 1434 UNREACHABLE();
1438 return Code::null(); 1435 return Code::null();
1439 } 1436 }
1440 1437
1441 } // namespace dart 1438 } // namespace dart
OLDNEW
« no previous file with comments | « vm/code_descriptors_test.cc ('k') | vm/code_index_table_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698