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

Unified Diff: src/compiler/common-operator.h

Issue 573703002: Add handling for deopt and argument adaptor frames. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding Jarin's comments. Created 6 years, 3 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
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index 137155e0f6f2302fd36925c2c31533ac0520cbf1..925807b6ce4213aaf47b31877d443c695e4b655d 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -6,6 +6,7 @@
#define V8_COMPILER_COMMON_OPERATOR_H_
#include "src/compiler/machine-type.h"
+#include "src/unique.h"
namespace v8 {
namespace internal {
@@ -13,9 +14,6 @@ namespace internal {
// Forward declarations.
class ExternalReference;
class OStream;
-template <typename>
-class Unique;
-class Zone;
namespace compiler {
@@ -34,18 +32,29 @@ enum OutputFrameStateCombine {
};
+enum FrameStateType { JS_FRAME, ARGUMENTS_ADAPTOR };
Michael Starzinger 2014/09/16 14:12:56 nit: This needs some comments I think. How about t
sigurds 2014/09/17 10:02:47 Done.
+
+
class FrameStateCallInfo FINAL {
public:
- FrameStateCallInfo(BailoutId bailout_id,
- OutputFrameStateCombine state_combine)
- : bailout_id_(bailout_id), frame_state_combine_(state_combine) {}
-
+ FrameStateCallInfo(FrameStateType type, BailoutId bailout_id,
+ OutputFrameStateCombine state_combine,
+ Unique<JSFunction> jsfunction = Unique<JSFunction>())
+ : type_(type),
+ bailout_id_(bailout_id),
+ frame_state_combine_(state_combine),
+ jsfunction_(jsfunction) {}
+
+ FrameStateType type() const { return type_; }
BailoutId bailout_id() const { return bailout_id_; }
OutputFrameStateCombine state_combine() const { return frame_state_combine_; }
+ Unique<JSFunction> jsfunction() const { return jsfunction_; }
private:
+ FrameStateType type_;
BailoutId bailout_id_;
OutputFrameStateCombine frame_state_combine_;
+ Unique<JSFunction> jsfunction_;
Michael Starzinger 2014/09/16 14:12:56 nit: IMHO we should just use Handle<JSFunction> in
sigurds 2014/09/17 10:02:47 Yes, absolutely correct. I propose leaving it as-i
};
@@ -81,8 +90,10 @@ class CommonOperatorBuilder FINAL {
const Operator* ValueEffect(int arguments);
const Operator* Finish(int arguments);
const Operator* StateValues(int arguments);
- const Operator* FrameState(BailoutId bailout_id,
- OutputFrameStateCombine combine);
+ const Operator* FrameState(
+ FrameStateType type, BailoutId bailout_id,
+ OutputFrameStateCombine state_combine,
+ Unique<JSFunction> jsfunction = Unique<JSFunction>());
const Operator* Call(const CallDescriptor* descriptor);
const Operator* Projection(size_t index);

Powered by Google App Engine
This is Rietveld 408576698