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

Unified Diff: src/hydrogen-instructions.h

Issue 102063004: Introduce API to temporarily interrupt long running JavaScript code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index d4beb6e1de2180b9fb903116a2d66b4dc7f21428..5f1385ed4a02911f7b891dd915c4c265bf73704b 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -1245,7 +1245,7 @@ class HInstruction : public HValue {
virtual void Verify() V8_OVERRIDE;
#endif
- virtual bool IsCall() { return false; }
+ virtual bool HasStackCheck() { return false; }
DECLARE_ABSTRACT_INSTRUCTION(Instruction)
@@ -2243,8 +2243,6 @@ class HCall : public HTemplateInstruction<V> {
return -argument_count();
}
- virtual bool IsCall() V8_FINAL V8_OVERRIDE { return true; }
-
private:
int argument_count_;
};
@@ -2316,6 +2314,12 @@ class HInvokeFunction V8_FINAL : public HBinaryCall {
Handle<JSFunction> known_function() { return known_function_; }
int formal_parameter_count() const { return formal_parameter_count_; }
+ virtual bool HasStackCheck() V8_FINAL V8_OVERRIDE {
+ return !known_function().is_null() &&
+ (known_function()->code()->kind() == Code::FUNCTION ||
+ known_function()->code()->kind() == Code::OPTIMIZED_FUNCTION);
+ }
+
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction)
private:
@@ -2348,6 +2352,11 @@ class HCallConstantFunction V8_FINAL : public HCall<0> {
return Representation::None();
}
+ virtual bool HasStackCheck() V8_FINAL V8_OVERRIDE {
+ return (function()->code()->kind() == Code::FUNCTION ||
+ function()->code()->kind() == Code::OPTIMIZED_FUNCTION);
+ }
+
DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction)
private:
@@ -2465,6 +2474,11 @@ class HCallKnownGlobal V8_FINAL : public HCall<0> {
return Representation::None();
}
+ virtual bool HasStackCheck() V8_FINAL V8_OVERRIDE {
+ return (target()->code()->kind() == Code::FUNCTION ||
+ target()->code()->kind() == Code::OPTIMIZED_FUNCTION);
+ }
+
DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal)
private:
« no previous file with comments | « src/execution.cc ('k') | src/hydrogen-sce.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698