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

Side by Side Diff: src/code-stubs-hydrogen.cc

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 AddInstruction(deopt); 502 AddInstruction(deopt);
503 current_block()->MarkAsDeoptimizing(); 503 current_block()->MarkAsDeoptimizing();
504 return GetParameter(0); 504 return GetParameter(0);
505 } 505 }
506 506
507 507
508 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { 508 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() {
509 return DoGenerateCode(this); 509 return DoGenerateCode(this);
510 } 510 }
511 511
512
513 template <>
514 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeUninitializedStub() {
515 CompareNilICStub* stub = casted_stub();
516 HIfContinuation continuation;
517 Handle<Map> sentinel_map(graph()->isolate()->heap()->meta_map());
518 BuildCompareNil(GetParameter(2), stub->Kind(),
519 stub->GetTypes(), sentinel_map,
520 RelocInfo::kNoPosition, &continuation);
521 IfBuilder if_nil(this, &continuation);
522 if_nil.Then();
523 if (continuation.IsTrueReachable()) {
524 environment()->Push(graph()->GetConstantSmi1());
525 }
526 if (continuation.IsFalseReachable()) {
527 if_nil.Else();
528 environment()->Push(graph()->GetConstantSmi0());
529 }
530 if_nil.End();
531 return environment()->Pop();
532 }
533
534
535 Handle<Code> CompareNilICStub::GenerateCode() {
536 return DoGenerateCode(this);
537 }
538
512 } } // namespace v8::internal 539 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698