Index: src/deoptimizer.h |
diff --git a/src/deoptimizer.h b/src/deoptimizer.h |
index db85ebf54187fed37a4c8a3b50aea93a94279a07..c8be66c7312e00aca2e7f9aa6141ec31a008d5bc 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,19 +164,27 @@ 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(); } |
+ reference operator[](size_t index) { return values_[index]; } |
+ const_reference operator[](size_t index) const { return values_[index]; } |
Jarin
2015/06/10 11:15:04
As discussed offline, we should not expose the val
Benedikt Meurer
2015/06/10 11:19:50
Done.
|
+ |
+ size_t size() const { return values_.size(); } |
Jarin
2015/06/10 11:15:04
Remove this. You should use the GetValueCount meth
Benedikt Meurer
2015/06/10 11:19:50
Done.
|
+ |
private: |
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 +194,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_; |
@@ -1015,7 +1022,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 +1069,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 +1079,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_; |