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

Unified Diff: vm/code_generator_ia32.cc

Issue 9721006: Second set of changes for implementation of stack map support. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/code_generator_ia32.h ('k') | vm/code_generator_ia32_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator_ia32.cc
===================================================================
--- vm/code_generator_ia32.cc (revision 5572)
+++ vm/code_generator_ia32.cc (working copy)
@@ -10,6 +10,7 @@
#include "lib/error.h"
#include "vm/ast_printer.h"
#include "vm/class_finalizer.h"
+#include "vm/code_descriptors.h"
#include "vm/dart_entry.h"
#include "vm/debugger.h"
#include "vm/longjump.h"
@@ -108,13 +109,15 @@
locals_space_size_(-1),
state_(NULL),
pc_descriptors_list_(NULL),
+ stackmap_builder_(NULL),
exception_handlers_list_(NULL),
try_index_(CatchClauseNode::kInvalidTryIndex),
context_level_(0) {
ASSERT(assembler_ != NULL);
ASSERT(parsed_function.node_sequence() != NULL);
ASSERT(Isolate::Current()->long_jump_base()->IsSafeToJump());
- pc_descriptors_list_ = new CodeGenerator::DescriptorList();
+ pc_descriptors_list_ = new DescriptorList();
+ // We do not build any stack maps in the unoptimizing compiler.
exception_handlers_list_ = new CodeGenerator::HandlerList();
}
@@ -214,6 +217,18 @@
}
+void CodeGenerator::FinalizeStackmaps(const Code& code) {
+ if (stackmap_builder_ == NULL) {
+ // The unoptimizing compiler has no stack maps.
+ code.set_stackmaps(Array::Handle());
+ } else {
+ // Finalize the stack map array and add it to the code object.
+ code.set_stackmaps(
+ Array::Handle(stackmap_builder_->FinalizeStackmaps(code)));
+ }
+}
+
+
void CodeGenerator::FinalizeVarDescriptors(const Code& code) {
const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle(
parsed_function_.node_sequence()->scope()->GetVarDescriptors());
« no previous file with comments | « vm/code_generator_ia32.h ('k') | vm/code_generator_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698