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

Unified Diff: src/deoptimizer.h

Issue 1166353004: [deoptimizer] Remove uses of TranslationIterator outside the deoptimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/deoptimizer.cc » ('j') | src/frames.cc » ('J')
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 67d96ae56a0aef9dcedd9975e017a9b8b354f961..db85ebf54187fed37a4c8a3b50aea93a94279a07 100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -67,7 +67,7 @@ class TranslatedValue BASE_EMBEDDED {
static TranslatedValue NewUInt32(TranslatedState* container, uint32_t value);
static TranslatedValue NewBool(TranslatedState* container, uint32_t value);
static TranslatedValue NewTagged(TranslatedState* container, Object* literal);
- static TranslatedValue NewInvalid();
+ static TranslatedValue NewInvalid(TranslatedState* container);
Isolate* isolate() const;
void MaterializeSimple();
@@ -125,10 +125,10 @@ class TranslatedFrame {
int GetValueCount();
Kind kind() const { return kind_; }
- BailoutId node_id() { return node_id_; }
- JSFunction* raw_function() { return raw_function_; }
- Handle<JSFunction> function() { return function_; }
- int height() { return height_; }
+ BailoutId node_id() const { return node_id_; }
+ JSFunction* raw_function() const { return raw_function_; }
+ Handle<JSFunction> function() const { return function_; }
+ int height() const { return height_; }
class iterator {
public:
@@ -160,8 +160,13 @@ class TranslatedFrame {
std::deque<TranslatedValue>::iterator position_;
};
+ typedef TranslatedValue& reference;
+ typedef TranslatedValue const& const_reference;
+
iterator begin() { return iterator(values_.begin()); }
iterator end() { return iterator(values_.end()); }
+ reference front() { return values_.front(); }
+ const_reference front() const { return values_.front(); }
private:
friend class TranslatedState;
@@ -232,6 +237,10 @@ class TranslatedState {
// Store newly materialized values into the isolate.
void StoreMaterializedValuesAndDeopt();
+ typedef std::vector<TranslatedFrame>::const_iterator const_iterator;
+ const_iterator begin() const { return frames_.begin(); }
+ const_iterator end() const { return frames_.end(); }
+
std::vector<TranslatedFrame>& frames() { return frames_; }
TranslatedFrame* GetArgumentsInfoFromJSFrameIndex(int jsframe_index,
« no previous file with comments | « no previous file | src/deoptimizer.cc » ('j') | src/frames.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698