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

Unified Diff: src/code-stubs.h

Issue 1053143005: Collect type feedback on result of Math.[round|ceil|floor] (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: MIPS port Created 5 years, 7 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/ast.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 6bfe8b5c21501800fcdcf92255d1d3a74b8bf4c7..bd9cd93f551ee49a4b4de1cbbc706a35b4a1a27d 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -30,6 +30,9 @@ namespace internal {
V(CallFunction) \
V(CallIC) \
V(CallIC_Array) \
+ V(CallIC_Round) \
+ V(CallIC_Floor) \
+ V(CallIC_Ceil) \
V(CEntry) \
V(CompareIC) \
V(DoubleToI) \
@@ -41,6 +44,9 @@ namespace internal {
V(LoadICTrampoline) \
V(CallICTrampoline) \
V(CallIC_ArrayTrampoline) \
+ V(CallIC_RoundTrampoline) \
+ V(CallIC_FloorTrampoline) \
+ V(CallIC_CeilTrampoline) \
V(LoadIndexedInterceptor) \
V(LoadIndexedString) \
V(MathPow) \
@@ -847,6 +853,8 @@ class CallICStub: public PlatformCodeStub {
return static_cast<ExtraICState>(minor_key_);
}
+ static const int kHasReturnedMinusZeroSentinel = 1;
+
protected:
bool CallAsMethod() const {
return state().call_type() == CallICState::METHOD;
@@ -869,6 +877,48 @@ class CallICStub: public PlatformCodeStub {
};
+class CallIC_RoundStub : public CallICStub {
+ public:
+ CallIC_RoundStub(Isolate* isolate, const CallICState& state_in)
+ : CallICStub(isolate, state_in) {}
+
+ InlineCacheState GetICState() const final { return MONOMORPHIC; }
+
+ private:
+ void PrintState(std::ostream& os) const override; // NOLINT
+
+ DEFINE_PLATFORM_CODE_STUB(CallIC_Round, CallICStub);
+};
+
+
+class CallIC_FloorStub : public CallICStub {
+ public:
+ CallIC_FloorStub(Isolate* isolate, const CallICState& state_in)
+ : CallICStub(isolate, state_in) {}
+
+ InlineCacheState GetICState() const final { return MONOMORPHIC; }
+
+ private:
+ void PrintState(std::ostream& os) const override; // NOLINT
+
+ DEFINE_PLATFORM_CODE_STUB(CallIC_Floor, CallICStub);
+};
+
+
+class CallIC_CeilStub : public CallICStub {
+ public:
+ CallIC_CeilStub(Isolate* isolate, const CallICState& state_in)
+ : CallICStub(isolate, state_in) {}
+
+ InlineCacheState GetICState() const final { return MONOMORPHIC; }
+
+ private:
+ void PrintState(std::ostream& os) const override; // NOLINT
+
+ DEFINE_PLATFORM_CODE_STUB(CallIC_Ceil, CallICStub);
+};
+
+
class CallIC_ArrayStub: public CallICStub {
public:
CallIC_ArrayStub(Isolate* isolate, const CallICState& state_in)
@@ -2081,6 +2131,36 @@ class CallIC_ArrayTrampolineStub : public CallICTrampolineStub {
};
+class CallIC_RoundTrampolineStub : public CallICTrampolineStub {
+ public:
+ CallIC_RoundTrampolineStub(Isolate* isolate, const CallICState& state)
+ : CallICTrampolineStub(isolate, state) {}
+
+ private:
+ DEFINE_PLATFORM_CODE_STUB(CallIC_RoundTrampoline, CallICTrampolineStub);
+};
+
+
+class CallIC_FloorTrampolineStub : public CallICTrampolineStub {
+ public:
+ CallIC_FloorTrampolineStub(Isolate* isolate, const CallICState& state)
+ : CallICTrampolineStub(isolate, state) {}
+
+ private:
+ DEFINE_PLATFORM_CODE_STUB(CallIC_FloorTrampoline, CallICTrampolineStub);
+};
+
+
+class CallIC_CeilTrampolineStub : public CallICTrampolineStub {
+ public:
+ CallIC_CeilTrampolineStub(Isolate* isolate, const CallICState& state)
+ : CallICTrampolineStub(isolate, state) {}
+
+ private:
+ DEFINE_PLATFORM_CODE_STUB(CallIC_CeilTrampoline, CallICTrampolineStub);
+};
+
+
class MegamorphicLoadStub : public HydrogenCodeStub {
public:
MegamorphicLoadStub(Isolate* isolate, const LoadICState& state)
« no previous file with comments | « src/ast.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698