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

Unified Diff: src/full-codegen.cc

Issue 100613004: Use optimized code map to cache OSR code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: correctly upload stuff Created 7 years 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 | « src/factory.cc ('k') | src/hydrogen-instructions.h » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 483d1e378d49307d84cf1be57a66de7c82fc1da0..00c6ade2735bb035b288040b5493afdf7b2e2d8a 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -1698,7 +1698,8 @@ void BackEdgeTable::AddStackCheck(CompilationInfo* info) {
DisallowHeapAllocation no_gc;
Isolate* isolate = info->isolate();
Code* code = info->shared_info()->code();
- Address pc = code->instruction_start() + info->osr_pc_offset();
+ Address pc = code->instruction_start() +
+ code->TranslateAstIdToPcOffset(info->osr_ast_id());
ASSERT_EQ(ON_STACK_REPLACEMENT, GetBackEdgeState(isolate, code, pc));
Code* patch = isolate->builtins()->builtin(Builtins::kOsrAfterStackCheck);
PatchAt(code, pc, OSR_AFTER_STACK_CHECK, patch);
@@ -1709,7 +1710,8 @@ void BackEdgeTable::RemoveStackCheck(CompilationInfo* info) {
DisallowHeapAllocation no_gc;
Isolate* isolate = info->isolate();
Code* code = info->shared_info()->code();
- Address pc = code->instruction_start() + info->osr_pc_offset();
+ Address pc = code->instruction_start() +
+ code->TranslateAstIdToPcOffset(info->osr_ast_id());
if (GetBackEdgeState(isolate, code, pc) == OSR_AFTER_STACK_CHECK) {
Code* patch = isolate->builtins()->builtin(Builtins::kOnStackReplacement);
PatchAt(code, pc, ON_STACK_REPLACEMENT, patch);
« no previous file with comments | « src/factory.cc ('k') | src/hydrogen-instructions.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698