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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 15806005: fix the compare nil ic (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/code-stubs.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index d5f32b88a1cb65f98c8b4a8a0c971c884740a31b..451b20b2e5c43502be800bcce51936d863b8619f 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -204,10 +204,10 @@ class CodeStubGraphBuilder: public CodeStubGraphBuilderBase {
protected:
virtual HValue* BuildCodeStub() {
- if (casted_stub()->IsMiss()) {
- return BuildCodeInitializedStub();
- } else {
+ if (casted_stub()->IsUninitialized()) {
return BuildCodeUninitializedStub();
+ } else {
+ return BuildCodeInitializedStub();
}
}
@@ -276,16 +276,17 @@ static Handle<Code> DoGenerateCode(Stub* stub) {
if (descriptor->register_param_count_ < 0) {
stub->InitializeInterfaceDescriptor(isolate, descriptor);
}
- // The miss case without stack parameters can use a light-weight stub to enter
+
+ // If we are uninitialized we can use a light-weight stub to enter
// the runtime that is significantly faster than using the standard
// stub-failure deopt mechanism.
- if (stub->IsMiss() && descriptor->stack_parameter_count_ == NULL) {
+ if (stub->IsUninitialized() && descriptor->has_miss_handler()) {
+ ASSERT(descriptor->stack_parameter_count_ == NULL);
return stub->GenerateLightweightMissCode(isolate);
- } else {
- CodeStubGraphBuilder<Stub> builder(stub);
- LChunk* chunk = OptimizeGraph(builder.CreateGraph());
- return chunk->Codegen();
}
+ CodeStubGraphBuilder<Stub> builder(stub);
+ LChunk* chunk = OptimizeGraph(builder.CreateGraph());
+ return chunk->Codegen();
}
@@ -658,7 +659,7 @@ Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() {
template <>
-HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeUninitializedStub() {
+HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() {
CompareNilICStub* stub = casted_stub();
HIfContinuation continuation;
Handle<Map> sentinel_map(graph()->isolate()->heap()->meta_map());
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698