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

Unified Diff: src/hydrogen.cc

Issue 6740023: Fix SlotRef::SlotAddress for parameters indices. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
« src/deoptimizer.h ('K') | « src/hydrogen.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 23831925f3738c8b6abedf6e0a391a9097ff1ad3..a44103e2796cd1f077aa6446b8ffc14b7fc4e4eb 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3828,12 +3828,18 @@ void HGraphBuilder::HandlePolymorphicCallNamed(Call* expr,
void HGraphBuilder::TraceInline(Handle<JSFunction> target, const char* reason) {
if (FLAG_trace_inlining) {
- SmartPointer<char> callee = target->shared()->DebugName()->ToCString();
- SmartPointer<char> caller =
- info()->function()->debug_name()->ToCString();
if (reason == NULL) {
+ // We are currently in the context of inlined function thus we have
+ // to go to an outer FunctionState to get caller.
+ SmartPointer<char> callee = target->shared()->DebugName()->ToCString();
+ SmartPointer<char> caller =
+ function_state()->outer()->compilation_info()->function()->
+ debug_name()->ToCString();
PrintF("Inlined %s called from %s.\n", *callee, *caller);
} else {
+ SmartPointer<char> callee = target->shared()->DebugName()->ToCString();
+ SmartPointer<char> caller =
+ info()->function()->debug_name()->ToCString();
PrintF("Did not inline %s called from %s (%s).\n",
*callee, *caller, reason);
}
@@ -5093,7 +5099,14 @@ void HGraphBuilder::GenerateIsStringWrapperSafeForDefaultValueOf(
// Support for construct call checks.
void HGraphBuilder::GenerateIsConstructCall(CallRuntime* call) {
ASSERT(call->arguments()->length() == 0);
- ast_context()->ReturnInstruction(new HIsConstructCall, call->id());
+ if (function_state()->outer() != NULL) {
+ // We are generating graph for inlined function. Currently
+ // constructor inlining is not supported and we can just return
+ // false from %_IsConstructCall().
+ ast_context()->ReturnValue(graph()->GetConstantFalse());
+ } else {
+ ast_context()->ReturnInstruction(new HIsConstructCall, call->id());
+ }
}
« src/deoptimizer.h ('K') | « src/hydrogen.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698