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

Unified Diff: src/code-stubs.cc

Issue 10830334: Fix bug in compare IC. BUG=2291 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 4 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 | « no previous file | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
===================================================================
--- src/code-stubs.cc (revision 12312)
+++ src/code-stubs.cc (working copy)
@@ -172,7 +172,9 @@
Isolate* isolate = new_object->GetIsolate();
Factory* factory = isolate->factory();
return Map::UpdateCodeCache(known_map_,
- factory->compare_ic_symbol(),
+ strict() ?
+ factory->strict_compare_ic_symbol() :
+ factory->compare_ic_symbol(),
new_object);
}
@@ -183,10 +185,16 @@
Code::Flags flags = Code::ComputeFlags(
static_cast<Code::Kind>(GetCodeKind()),
UNINITIALIZED);
+ ASSERT(op_ == Token::EQ || op_ == Token::EQ_STRICT);
Handle<Object> probe(
- known_map_->FindInCodeCache(*factory->compare_ic_symbol(), flags));
+ known_map_->FindInCodeCache(
+ strict() ?
+ *factory->strict_compare_ic_symbol() :
+ *factory->compare_ic_symbol(),
+ flags));
if (probe->IsCode()) {
*code_out = Code::cast(*probe);
+ ASSERT(op_ == (*code_out)->compare_operation() + Token::EQ);
return true;
}
return false;
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698