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

Unified Diff: src/full-codegen.cc

Issue 112863002: Merge bleeding_edge 18021:18297 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: 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/frames.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »
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 fec9ee565d2baf753e07997663040fce9b585e16..a40b61e5c91f6b8854db0300f11dd247535404b4 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -1579,7 +1579,8 @@ void FullCodeGenerator::VisitNativeFunctionLiteral(
// Compute the function template for the native function.
Handle<String> name = expr->name();
v8::Handle<v8::FunctionTemplate> fun_template =
- expr->extension()->GetNativeFunction(v8::Utils::ToLocal(name));
+ expr->extension()->GetNativeFunctionTemplate(
+ reinterpret_cast<v8::Isolate*>(isolate()), v8::Utils::ToLocal(name));
ASSERT(!fun_template.IsEmpty());
// Instantiate the function and create a shared function info from it.
@@ -1696,9 +1697,11 @@ void BackEdgeTable::Revert(Isolate* isolate,
void BackEdgeTable::AddStackCheck(CompilationInfo* info) {
DisallowHeapAllocation no_gc;
Isolate* isolate = info->isolate();
- Code* code = info->shared_info()->code();
+ Code* code = *info->osr_patched_code();
Address pc = code->instruction_start() + info->osr_pc_offset();
- ASSERT_EQ(ON_STACK_REPLACEMENT, GetBackEdgeState(isolate, code, pc));
+ ASSERT_EQ(info->osr_ast_id().ToInt(),
+ code->TranslatePcOffsetToAstId(info->osr_pc_offset()).ToInt());
+ ASSERT_NE(INTERRUPT, GetBackEdgeState(isolate, code, pc));
Code* patch = isolate->builtins()->builtin(Builtins::kOsrAfterStackCheck);
PatchAt(code, pc, OSR_AFTER_STACK_CHECK, patch);
}
@@ -1707,8 +1710,10 @@ void BackEdgeTable::AddStackCheck(CompilationInfo* info) {
void BackEdgeTable::RemoveStackCheck(CompilationInfo* info) {
DisallowHeapAllocation no_gc;
Isolate* isolate = info->isolate();
- Code* code = info->shared_info()->code();
+ Code* code = *info->osr_patched_code();
Address pc = code->instruction_start() + info->osr_pc_offset();
+ ASSERT_EQ(info->osr_ast_id().ToInt(),
+ code->TranslatePcOffsetToAstId(info->osr_pc_offset()).ToInt());
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/frames.cc ('k') | src/gdb-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698