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

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

Issue 9484002: StepOver, StepInto, StepOut (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/code_generator_ia32.h » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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" 7 #include "vm/code_index_table.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 caller_frame->pc(), 432 caller_frame->pc(),
433 target_function.ToFullyQualifiedCString(), 433 target_function.ToFullyQualifiedCString(),
434 new_target); 434 new_target);
435 } 435 }
436 } 436 }
437 437
438 438
439 // Resolves and compiles the target function of an instance call, updates 439 // Resolves and compiles the target function of an instance call, updates
440 // function cache of the receiver's class and returns the compiled code or null. 440 // function cache of the receiver's class and returns the compiled code or null.
441 // Only the number of named arguments is checked, but not the actual names. 441 // Only the number of named arguments is checked, but not the actual names.
442 static RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate, 442 RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate,
443 const Instance& receiver) { 443 const Instance& receiver) {
444 DartFrameIterator iterator; 444 DartFrameIterator iterator;
445 DartFrame* caller_frame = iterator.NextFrame(); 445 DartFrame* caller_frame = iterator.NextFrame();
446 ASSERT(caller_frame != NULL); 446 ASSERT(caller_frame != NULL);
447 int num_arguments = -1; 447 int num_arguments = -1;
448 int num_named_arguments = -1; 448 int num_named_arguments = -1;
449 uword target = 0; 449 uword target = 0;
450 String& function_name = String::Handle(); 450 String& function_name = String::Handle();
451 CodePatcher::GetInstanceCallAt(caller_frame->pc(), 451 CodePatcher::GetInstanceCallAt(caller_frame->pc(),
452 &function_name, 452 &function_name,
453 &num_arguments, 453 &num_arguments,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 const Function& function = Function::CheckedHandle(arguments.At(0)); 531 const Function& function = Function::CheckedHandle(arguments.At(0));
532 if (!function.HasCode()) { 532 if (!function.HasCode()) {
533 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 533 const Error& error = Error::Handle(Compiler::CompileFunction(function));
534 if (!error.IsNull()) { 534 if (!error.IsNull()) {
535 Exceptions::PropagateError(error); 535 Exceptions::PropagateError(error);
536 } 536 }
537 } 537 }
538 } 538 }
539 539
540 540
541 // Gets called from debug stub when code reaches a breakpoint at a return
542 // in Dart code.
543 DEFINE_RUNTIME_ENTRY(BreakpointReturnHandler, 0) {
544 ASSERT(arguments.Count() ==
545 kBreakpointReturnHandlerRuntimeEntry.argument_count());
546 ASSERT(isolate->debugger() != NULL);
547 isolate->debugger()->BreakpointCallback();
548 }
549
550
541 // Gets called from debug stub when code reaches a breakpoint. 551 // Gets called from debug stub when code reaches a breakpoint.
542 DEFINE_RUNTIME_ENTRY(BreakpointDynamicHandler, 0) { 552 DEFINE_RUNTIME_ENTRY(BreakpointDynamicHandler, 0) {
543 ASSERT(arguments.Count() == 553 ASSERT(arguments.Count() ==
544 kBreakpointDynamicHandlerRuntimeEntry.argument_count()); 554 kBreakpointDynamicHandlerRuntimeEntry.argument_count());
545 ASSERT(isolate->debugger() != NULL); 555 ASSERT(isolate->debugger() != NULL);
546 isolate->debugger()->BreakpointCallback(); 556 isolate->debugger()->BreakpointCallback();
547 } 557 }
548 558
549 559
550 static RawFunction* InlineCacheMissHandler( 560 static RawFunction* InlineCacheMissHandler(
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 } 1187 }
1178 } 1188 }
1179 } 1189 }
1180 // The cache is null terminated, therefore the loop above should never 1190 // The cache is null terminated, therefore the loop above should never
1181 // terminate by itself. 1191 // terminate by itself.
1182 UNREACHABLE(); 1192 UNREACHABLE();
1183 return Code::null(); 1193 return Code::null();
1184 } 1194 }
1185 1195
1186 } // namespace dart 1196 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/code_generator_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698