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

Unified Diff: src/hydrogen-instructions.h

Issue 71783003: Reland and fix "Add support for keyed-call on arrays of fast elements" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test + fix Created 7 years, 1 month 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/code-stubs-ia32.cc » ('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 9bd0b90b4c3b55b0b958cfeb0ee4b59e7dd52a42..adf088d61ce3d72ce0e52634269165cf49bf58cf 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -2289,19 +2289,38 @@ class HCallNamed V8_FINAL : public HUnaryCall {
};
+enum CallMode {
+ NORMAL_CALL,
+ TAIL_CALL
+};
+
+
class HCallFunction V8_FINAL : public HBinaryCall {
public:
DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int);
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(
+ HCallFunction, HValue*, int, CallMode);
+
+ bool IsTailCall() const { return call_mode_ == TAIL_CALL; }
HValue* context() { return first(); }
HValue* function() { return second(); }
DECLARE_CONCRETE_INSTRUCTION(CallFunction)
+ virtual int argument_delta() const V8_OVERRIDE {
+ if (IsTailCall()) return 0;
+ return -argument_count();
+ }
+
private:
- HCallFunction(HValue* context, HValue* function, int argument_count)
- : HBinaryCall(context, function, argument_count) {
+ HCallFunction(HValue* context,
+ HValue* function,
+ int argument_count,
+ CallMode mode = NORMAL_CALL)
+ : HBinaryCall(context, function, argument_count), call_mode_(mode) {
}
+ CallMode call_mode_;
};
@@ -7183,6 +7202,8 @@ class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> {
DECLARE_CONCRETE_INSTRUCTION(CheckMapValue)
protected:
+ virtual int RedefinedOperandIndex() { return 0; }
+
virtual bool DataEquals(HValue* other) V8_OVERRIDE {
return true;
}
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698