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

Unified Diff: src/objects-inl.h

Issue 13728002: Add an IC for CompareNil operations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix SunSpider regression Created 7 years, 8 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/objects.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index f3a029ee340c79b043bbc7d239fb22cb6e4039b9..84bf81e9432ec7f7942ecf450018a082dff4e32b 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3663,6 +3663,7 @@ int Code::major_key() {
kind() == UNARY_OP_IC ||
kind() == BINARY_OP_IC ||
kind() == COMPARE_IC ||
+ kind() == COMPARE_NIL_IC ||
kind() == LOAD_IC ||
kind() == KEYED_LOAD_IC ||
kind() == TO_BOOLEAN_IC);
@@ -3676,6 +3677,7 @@ void Code::set_major_key(int major) {
kind() == UNARY_OP_IC ||
kind() == BINARY_OP_IC ||
kind() == COMPARE_IC ||
+ kind() == COMPARE_NIL_IC ||
kind() == LOAD_IC ||
kind() == KEYED_LOAD_IC ||
kind() == STORE_IC ||
@@ -3892,6 +3894,12 @@ void Code::set_to_boolean_state(byte value) {
}
+byte Code::compare_nil_state() {
+ ASSERT(is_compare_nil_ic_stub());
+ return extra_ic_state();
+}
+
+
bool Code::has_function_cache() {
ASSERT(kind() == STUB);
return HasFunctionCacheField::decode(
@@ -5124,7 +5132,8 @@ void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) {
int Code::stub_info() {
- ASSERT(kind() == COMPARE_IC || kind() == BINARY_OP_IC || kind() == LOAD_IC);
+ ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
+ kind() == BINARY_OP_IC || kind() == LOAD_IC);
Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset);
return Smi::cast(value)->value();
}
@@ -5132,6 +5141,7 @@ int Code::stub_info() {
void Code::set_stub_info(int value) {
ASSERT(kind() == COMPARE_IC ||
+ kind() == COMPARE_NIL_IC ||
kind() == BINARY_OP_IC ||
kind() == STUB ||
kind() == LOAD_IC ||
« no previous file with comments | « src/objects.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698