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

Unified Diff: src/hydrogen-instructions.h

Issue 10910161: Partial ia32 implementation of optimized try/catch (by Kevin Millikin) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed build. Created 8 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 6c938cd4bf5a8e0773e9020ae6739063612cab7d..97fd1194fcea9a69cbd731bb604a9869fec8ba8b 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -68,8 +68,8 @@ class LChunkBuilder;
V(ArgumentsLength) \
V(ArgumentsObject) \
V(ArrayLiteral) \
- V(Bitwise) \
V(BitNot) \
+ V(Bitwise) \
V(BlockEntry) \
V(BoundsCheck) \
V(Branch) \
@@ -91,11 +91,11 @@ class LChunkBuilder;
V(CheckSmi) \
V(ClampToUint8) \
V(ClassOfTestAndBranch) \
- V(CompareIDAndBranch) \
+ V(CompareConstantEqAndBranch) \
V(CompareGeneric) \
- V(CompareObjectEqAndBranch) \
+ V(CompareIDAndBranch) \
V(CompareMap) \
- V(CompareConstantEqAndBranch) \
+ V(CompareObjectEqAndBranch) \
V(Constant) \
V(Context) \
V(DeclareGlobals) \
@@ -104,6 +104,7 @@ class LChunkBuilder;
V(Div) \
V(ElementsKind) \
V(EnterInlined) \
+ V(EnterTry) \
V(FastLiteral) \
V(FixedArrayBaseLength) \
V(ForceRepresentation) \
@@ -121,11 +122,12 @@ class LChunkBuilder;
V(IsConstructCallAndBranch) \
V(IsNilAndBranch) \
V(IsObjectAndBranch) \
- V(IsStringAndBranch) \
V(IsSmiAndBranch) \
+ V(IsStringAndBranch) \
V(IsUndetectableAndBranch) \
V(JSArrayLength) \
V(LeaveInlined) \
+ V(LeaveTry) \
V(LoadContextSlot) \
V(LoadElements) \
V(LoadExternalArrayPointer) \
@@ -939,6 +941,24 @@ class HTemplateInstruction : public HInstruction {
};
+template <>
+class HTemplateInstruction<0> : public HInstruction {
+ public:
+ int OperandCount() { return 0; }
+ HValue* OperandAt(int i) {
+ UNREACHABLE();
+ return NULL;
+ }
+
+ virtual Representation RequiredInputRepresentation(int index) {
+ return Representation::None();
+ }
+
+ protected:
+ void InternalSetOperandAt(int i, HValue* value) { UNREACHABLE(); }
+};
+
+
class HControlInstruction: public HInstruction {
public:
virtual HBasicBlock* SuccessorAt(int i) = 0;
@@ -1411,6 +1431,29 @@ class HStackCheck: public HTemplateInstruction<1> {
};
+class HEnterTry: public HTemplateInstruction<0> {
+ public:
+ explicit HEnterTry(int index) : index_(index) {
+ SetAllSideEffects();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(EnterTry)
+
+ int index() { return index_; }
+
+ private:
+ int index_;
+};
+
+
+class HLeaveTry: public HTemplateInstruction<0> {
+ public:
+ HLeaveTry() { SetAllSideEffects(); }
+
+ DECLARE_CONCRETE_INSTRUCTION(LeaveTry)
+};
+
+
enum InliningKind {
NORMAL_RETURN, // Normal function/method call and return.
DROP_EXTRA_ON_RETURN, // Drop an extra value from the environment on return.
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698