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

Unified Diff: vm/object.cc

Issue 10409038: Remove the special stub code region as we don't need it anymore. With the new frame layout conventi… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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/object.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/object.cc
===================================================================
--- vm/object.cc (revision 7768)
+++ vm/object.cc (working copy)
@@ -5664,13 +5664,14 @@
}
-RawInstructions* Instructions::New(intptr_t size, Heap::Space space) {
- ASSERT(space == Heap::kDartCode || space == Heap::kStubCode);
+RawInstructions* Instructions::New(intptr_t size) {
const Class& instructions_class = Class::Handle(Object::instructions_class());
Instructions& result = Instructions::Handle();
{
uword aligned_size = Instructions::InstanceSize(size);
- RawObject* raw = Object::Allocate(instructions_class, aligned_size, space);
+ RawObject* raw = Object::Allocate(instructions_class,
+ aligned_size,
+ Heap::kCode);
NoGCScope no_gc;
// TODO(iposva): Remove premarking once old and code spaces are merged.
raw->SetMarkBit();
@@ -6148,14 +6149,12 @@
}
-RawCode* Code::FinalizeCode(const char* name,
- Assembler* assembler,
- Heap::Space space) {
+RawCode* Code::FinalizeCode(const char* name, Assembler* assembler) {
ASSERT(assembler != NULL);
// Allocate the Instructions object.
Instructions& instrs =
- Instructions::ZoneHandle(Instructions::New(assembler->CodeSize(), space));
+ Instructions::ZoneHandle(Instructions::New(assembler->CodeSize()));
// Copy the instructions into the instruction area and apply all fixups.
// Embedded pointers are still in handles at this point.
@@ -6222,20 +6221,13 @@
RawCode* Code::FinalizeCode(const Function& function, Assembler* assembler) {
// Calling ToFullyQualifiedCString is very expensive, try to avoid it.
if (FLAG_generate_gdb_symbols || (Dart::pprof_symbol_generator() != NULL)) {
- return FinalizeCode(function.ToFullyQualifiedCString(),
- assembler,
- Heap::kDartCode);
+ return FinalizeCode(function.ToFullyQualifiedCString(), assembler);
} else {
- return FinalizeCode("", assembler, Heap::kDartCode);
+ return FinalizeCode("", assembler);
}
}
-RawCode* Code::FinalizeStubCode(const char* name, Assembler* assembler) {
- return FinalizeCode(name, assembler, Heap::kStubCode);
-}
-
-
// Check if object matches find condition.
bool Code::FindRawCodeVisitor::FindObject(RawObject* obj) {
return RawInstructions::ContainsPC(obj, pc_);
@@ -6251,10 +6243,6 @@
if (instr != Instructions::null()) {
return instr->ptr()->code_;
}
- instr = isolate->heap()->FindObjectInStubCodeSpace(&visitor);
- if (instr != Instructions::null()) {
- return instr->ptr()->code_;
- }
return Code::null();
}
« no previous file with comments | « vm/object.h ('k') | vm/stub_code.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698