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

Unified Diff: src/frames.cc

Issue 1169103004: [deoptimizer] Basic support inlining based on SharedFunctionInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Jaros comment. Created 5 years, 6 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 | « src/frames.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 0b6942183990f92aa3676732b73ee09f2f0389cd..04ebbd85c6dffb8ca1a10d0b12cc90010b4c9354 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -863,16 +863,6 @@ void FrameSummary::Print() {
}
-JSFunction* OptimizedFrame::LiteralAt(FixedArray* literal_array,
- int literal_id) {
- if (literal_id == Translation::kSelfLiteralId) {
- return function();
- }
-
- return JSFunction::cast(literal_array->get(literal_id));
-}
-
-
void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
DCHECK(frames->length() == 0);
DCHECK(is_optimized());
@@ -889,14 +879,18 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
DisallowHeapAllocation no_gc;
TranslatedState state(this);
bool is_constructor = IsConstructor();
- for (TranslatedFrame const& frame : state) {
+ for (TranslatedFrame& frame : state) {
switch (frame.kind()) {
case TranslatedFrame::kFunction: {
BailoutId const ast_id = frame.node_id();
- JSFunction* const function = frame.raw_function();
+ TranslatedFrame::iterator it = frame.begin();
+
+ // Get the correct function in the optimized frame.
+ JSFunction* function = JSFunction::cast(it->GetRawValue());
+ it++;
// Get the correct receiver in the optimized frame.
- Object* receiver = frame.front().GetRawValue();
+ Object* receiver = it->GetRawValue();
if (receiver == isolate()->heap()->arguments_marker()) {
// TODO(jarin): Materializing a captured object (or duplicated
// object) is hard, we return undefined for now. This breaks the
@@ -992,7 +986,7 @@ void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
TranslatedState state(this);
for (TranslatedFrame const& frame : state) {
if (frame.kind() == TranslatedFrame::kFunction) {
- functions->Add(frame.raw_function());
+ functions->Add(JSFunction::cast(frame.front().GetRawValue()));
}
}
}
« no previous file with comments | « src/frames.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698