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

Unified Diff: src/deoptimizer.h

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/compiler/js-typed-lowering.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index db85ebf54187fed37a4c8a3b50aea93a94279a07..aa77bf5119c49a53ac571c0ff8b4e9407effa1ae 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -126,8 +126,7 @@ class TranslatedFrame {
Kind kind() const { return kind_; }
BailoutId node_id() const { return node_id_; }
- JSFunction* raw_function() const { return raw_function_; }
- Handle<JSFunction> function() const { return function_; }
+ Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
int height() const { return height_; }
class iterator {
@@ -165,6 +164,7 @@ class TranslatedFrame {
iterator begin() { return iterator(values_.begin()); }
iterator end() { return iterator(values_.end()); }
+
reference front() { return values_.front(); }
const_reference front() const { return values_.front(); }
@@ -172,12 +172,14 @@ class TranslatedFrame {
friend class TranslatedState;
// Constructor static methods.
- static TranslatedFrame JSFrame(BailoutId node_id, JSFunction* function,
- int height);
- static TranslatedFrame AccessorFrame(Kind kind, JSFunction* function);
- static TranslatedFrame ArgumentsAdaptorFrame(JSFunction* function,
+ static TranslatedFrame JSFrame(BailoutId node_id,
+ SharedFunctionInfo* shared_info, int height);
+ static TranslatedFrame AccessorFrame(Kind kind,
+ SharedFunctionInfo* shared_info);
+ static TranslatedFrame ArgumentsAdaptorFrame(SharedFunctionInfo* shared_info,
int height);
- static TranslatedFrame ConstructStubFrame(JSFunction* function, int height);
+ static TranslatedFrame ConstructStubFrame(SharedFunctionInfo* shared_info,
+ int height);
static TranslatedFrame CompiledStubFrame(int height, Isolate* isolate) {
return TranslatedFrame(kCompiledStub, isolate, nullptr, height);
}
@@ -187,22 +189,22 @@ class TranslatedFrame {
static void AdvanceIterator(std::deque<TranslatedValue>::iterator* iter);
- TranslatedFrame(Kind kind, Isolate* isolate, JSFunction* function = nullptr,
- int height = 0)
+ TranslatedFrame(Kind kind, Isolate* isolate,
+ SharedFunctionInfo* shared_info = nullptr, int height = 0)
: kind_(kind),
node_id_(BailoutId::None()),
- raw_function_(function),
+ raw_shared_info_(shared_info),
height_(height),
isolate_(isolate) {}
void Add(const TranslatedValue& value) { values_.push_back(value); }
- void Handlify(Isolate* isolate);
+ void Handlify();
Kind kind_;
BailoutId node_id_;
- JSFunction* raw_function_;
- Handle<JSFunction> function_;
+ SharedFunctionInfo* raw_shared_info_;
+ Handle<SharedFunctionInfo> shared_info_;
int height_;
Isolate* isolate_;
@@ -237,6 +239,10 @@ class TranslatedState {
// Store newly materialized values into the isolate.
void StoreMaterializedValuesAndDeopt();
+ typedef std::vector<TranslatedFrame>::iterator iterator;
+ iterator begin() { return frames_.begin(); }
+ iterator end() { return frames_.end(); }
+
typedef std::vector<TranslatedFrame>::const_iterator const_iterator;
const_iterator begin() const { return frames_.begin(); }
const_iterator end() const { return frames_.end(); }
@@ -1015,7 +1021,8 @@ class TranslationIterator BASE_EMBEDDED {
V(UINT32_STACK_SLOT) \
V(BOOL_STACK_SLOT) \
V(DOUBLE_STACK_SLOT) \
- V(LITERAL)
+ V(LITERAL) \
+ V(JS_FRAME_FUNCTION)
class Translation BASE_EMBEDDED {
@@ -1061,6 +1068,7 @@ class Translation BASE_EMBEDDED {
void StoreDoubleStackSlot(int index);
void StoreLiteral(int literal_id);
void StoreArgumentsObject(bool args_known, int args_index, int args_length);
+ void StoreJSFrameFunction();
Zone* zone() const { return zone_; }
@@ -1070,9 +1078,6 @@ class Translation BASE_EMBEDDED {
static const char* StringFor(Opcode opcode);
#endif
- // A literal id which refers to the JSFunction itself.
- static const int kSelfLiteralId = -239;
-
private:
TranslationBuffer* buffer_;
int index_;
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698