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

Unified Diff: vm/stack_frame.cc

Issue 10223015: Add a stub_code_space in the heap alongside code_space so that stub code generation happens here an… (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
« vm/heap.cc ('K') | « vm/stack_frame.h ('k') | vm/stub_code.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/stack_frame.cc
===================================================================
--- vm/stack_frame.cc (revision 6972)
+++ vm/stack_frame.cc (working copy)
@@ -20,17 +20,13 @@
bool StackFrame::IsStubFrame() const {
- if (Dart::vm_isolate()->heap()->CodeContains(pc())) {
+ if (Dart::vm_isolate()->heap()->StubCodeContains(pc())) {
return true; // Common stub code is generated in the VM heap.
}
- // We add a no gc scope to ensure that the code below does not trigger
- // a GC as we are handling raw object references here. It is possible
- // that the code is called while a GC is in progress, that is ok.
- NoGCScope no_gc;
- Isolate* isolate = Isolate::Current();
- RawCode* code = StackFrame::LookupCode(isolate, pc());
- return ((code != Code::null()) &&
- (code->ptr()->function_ == Function::null()));
+ if (Isolate::Current()->heap()->StubCodeContains(pc())) {
+ return true; // Common stub code is generated in the VM heap.
+ }
+ return false;
}
@@ -169,12 +165,9 @@
bool StackFrame::IsValid() const {
- if (IsEntryFrame() || IsExitFrame()) {
+ if (IsEntryFrame() || IsExitFrame() || IsStubFrame()) {
return true;
}
- if (Dart::vm_isolate()->heap()->CodeContains(pc())) {
- return true; // Common stub code is generated in the VM heap.
- }
return (StackFrame::LookupCode(Isolate::Current(), pc()) != Code::null());
}
« vm/heap.cc ('K') | « vm/stack_frame.h ('k') | vm/stub_code.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698