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

Unified Diff: vm/code_generator.cc

Issue 10173008: Simplify representation of stack frames. Remove the special types DartFrame/StubFrame and instead u… (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/assembler_x64.cc ('k') | vm/code_generator_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator.cc
===================================================================
--- vm/code_generator.cc (revision 6919)
+++ vm/code_generator.cc (working copy)
@@ -344,8 +344,8 @@
String::Handle(type.Name()).ToCString());
}
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
const Function& function = Function::Handle(
caller_frame->LookupDartFunction());
OS::Print(" -> Function %s\n", function.ToFullyQualifiedCString());
@@ -363,8 +363,8 @@
if (type.IsInstantiated() &&
!Class::Handle(type.type_class()).HasTypeArguments()) {
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
const Code& code = Code::Handle(caller_frame->LookupDartCode());
ASSERT(!code.IsNull());
uword loc = code.GetTypeTestAtNodeId(node_id);
@@ -457,8 +457,8 @@
String::Handle(dst_type.Name()).ToCString());
}
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
const Function& function = Function::Handle(
caller_frame->LookupDartFunction());
OS::Print(" -> Function %s\n", function.ToFullyQualifiedCString());
@@ -487,8 +487,8 @@
if (dst_type.IsInstantiated() &&
!Class::Handle(dst_type.type_class()).HasTypeArguments()) {
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
const Code& code = Code::Handle(caller_frame->LookupDartCode());
ASSERT(!code.IsNull());
uword loc = code.GetTypeTestAtNodeId(node_id);
@@ -648,8 +648,8 @@
// the target method.
ASSERT(arguments.Count() == kPatchStaticCallRuntimeEntry.argument_count());
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
uword target = 0;
Function& target_function = Function::Handle();
CodePatcher::GetStaticCallAt(caller_frame->pc(), &target_function, &target);
@@ -673,8 +673,8 @@
RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate,
const Instance& receiver) {
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
int num_arguments = -1;
int num_named_arguments = -1;
uword target = 0;
@@ -817,7 +817,8 @@
return target_function.raw();
}
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
ICData& ic_data = ICData::Handle(
CodePatcher::GetInstanceCallIcDataAt(caller_frame->pc()));
#if defined(DEBUG)
@@ -1284,8 +1285,8 @@
ASSERT(arguments.Count() == kDeoptimizeRuntimeEntry.argument_count());
const Smi& deoptimization_reason_id = Smi::CheckedHandle(arguments.At(0));
DartFrameIterator iterator;
- DartFrame* caller_frame = iterator.NextFrame();
- ASSERT(caller_frame != NULL);
+ StackFrame* caller_frame = iterator.NextFrame();
+ ASSERT(caller_frame != NULL && caller_frame->IsDartFrame());
const Code& optimized_code = Code::Handle(caller_frame->LookupDartCode());
const Function& function = Function::Handle(optimized_code.function());
ASSERT(!function.IsNull());
« no previous file with comments | « vm/assembler_x64.cc ('k') | vm/code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698