Revision: 15003
Author: [email protected]
Date: Fri Jun 7 06:11:17 2013
Log: Fix InlineCacheState for ToBoolean and CompareIC
BUG=
[email protected]
Review URL: https://codereview.chromium.org/16613003
http://code.google.com/p/v8/source/detail?r=15003
Modified:
/branches/bleeding_edge/src/code-stubs.cc
/branches/bleeding_edge/src/code-stubs.h
=======================================
--- /branches/bleeding_edge/src/code-stubs.cc Wed Jun 5 03:43:18 2013
+++ /branches/bleeding_edge/src/code-stubs.cc Fri Jun 7 06:11:17 2013
@@ -303,6 +303,27 @@
GenerateAddStrings(masm);
GenerateTypeTransition(masm);
}
+
+
+InlineCacheState ICCompareStub::GetICState() {
+ CompareIC::State state = Max(left_, right_);
+ switch (state) {
+ case CompareIC::UNINITIALIZED:
+ return ::v8::internal::UNINITIALIZED;
+ case CompareIC::SMI:
+ case CompareIC::NUMBER:
+ case CompareIC::INTERNALIZED_STRING:
+ case CompareIC::STRING:
+ case CompareIC::UNIQUE_NAME:
+ case CompareIC::OBJECT:
+ case CompareIC::KNOWN_OBJECT:
+ return MONOMORPHIC;
+ case CompareIC::GENERIC:
+ return ::v8::internal::GENERIC;
+ }
+ UNREACHABLE();
+ return ::v8::internal::UNINITIALIZED;
+}
void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) {
=======================================
--- /branches/bleeding_edge/src/code-stubs.h Wed Jun 5 03:43:18 2013
+++ /branches/bleeding_edge/src/code-stubs.h Fri Jun 7 06:11:17 2013
@@ -1079,6 +1079,8 @@
static CompareIC::State CompareState(int minor_key) {
return
static_cast<CompareIC::State>(HandlerStateField::decode(minor_key));
}
+
+ virtual InlineCacheState GetICState();
private:
class OpField: public BitField<int, 0, 3> { };
@@ -2027,6 +2029,13 @@
return types_.ToIntegral();
}
+ virtual InlineCacheState GetICState() {
+ if (types_.IsEmpty()) {
+ return ::v8::internal::UNINITIALIZED;
+ } else {
+ return MONOMORPHIC;
+ }
+ }
private:
Major MajorKey() { return ToBoolean; }
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.