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

Unified Diff: vm/compiler.cc

Issue 10025003: Revert change 6302 until the compiler warning is addressed. (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/code_index_table_test.cc ('k') | vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/compiler.cc
===================================================================
--- vm/compiler.cc (revision 6302)
+++ vm/compiler.cc (working copy)
@@ -7,6 +7,7 @@
#include "vm/assembler.h"
#include "vm/ast_printer.h"
#include "vm/code_generator.h"
+#include "vm/code_index_table.h"
#include "vm/code_patcher.h"
#include "vm/dart_entry.h"
#include "vm/debugger.h"
@@ -128,6 +129,8 @@
Parser::ParseFunction(&parsed_function);
parsed_function.AllocateVariables();
+ CodeIndexTable* code_index_table = isolate->code_index_table();
+ ASSERT(code_index_table != NULL);
bool is_compiled = false;
if (FLAG_use_new_compiler) {
ASSERT(!optimized);
@@ -159,6 +162,7 @@
function.set_unoptimized_code(code);
function.SetCode(code);
ASSERT(CodePatcher::CodeIsPatchable(code));
+ code_index_table->AddCode(code);
is_compiled = true;
} else {
// We bailed out.
@@ -196,6 +200,7 @@
code_gen.FinalizeStackmaps(code);
code_gen.FinalizeExceptionHandlers(code);
function.SetCode(code);
+ code_index_table->AddCode(code);
CodePatcher::PatchEntry(Code::Handle(function.unoptimized_code()));
if (FLAG_trace_compiler) {
OS::Print("--> patching entry 0x%x\n",
@@ -218,6 +223,7 @@
function.set_unoptimized_code(code);
function.SetCode(code);
ASSERT(CodePatcher::CodeIsPatchable(code));
+ code_index_table->AddCode(code);
} else {
// Disable optimized code.
ASSERT(function.HasOptimizedCode());
@@ -372,6 +378,12 @@
const Code& code = Code::Handle(Code::FinalizeCode(kEvalConst, &assembler));
func.SetCode(code);
+ CodeIndexTable* code_index_table = isolate->code_index_table();
+ ASSERT(code_index_table != NULL);
+ code_index_table->AddCode(code);
+ // TODO(hausner): We need a way to remove these one-time execution
+ // functions from the global code description (PC mapping) tables so
+ // we don't pollute the system unnecessarily with stale data.
code_gen.FinalizePcDescriptors(code);
code_gen.FinalizeStackmaps(code);
code_gen.FinalizeExceptionHandlers(code);
« no previous file with comments | « vm/code_index_table_test.cc ('k') | vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698