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

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

Issue 2043183003: Replace all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: simplifying checks Created 4 years, 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 4529 matching lines...) Expand 10 before | Expand all | Expand 10 after
4540 return os << ")"; 4540 return os << ")";
4541 } 4541 }
4542 4542
4543 bool ToBooleanICStub::Types::UpdateStatus(Isolate* isolate, 4543 bool ToBooleanICStub::Types::UpdateStatus(Isolate* isolate,
4544 Handle<Object> object) { 4544 Handle<Object> object) {
4545 if (object->IsUndefined(isolate)) { 4545 if (object->IsUndefined(isolate)) {
4546 Add(UNDEFINED); 4546 Add(UNDEFINED);
4547 return false; 4547 return false;
4548 } else if (object->IsBoolean()) { 4548 } else if (object->IsBoolean()) {
4549 Add(BOOLEAN); 4549 Add(BOOLEAN);
4550 return object->IsTrue(); 4550 return object->IsTrue(isolate);
4551 } else if (object->IsNull()) { 4551 } else if (object->IsNull(isolate)) {
4552 Add(NULL_TYPE); 4552 Add(NULL_TYPE);
4553 return false; 4553 return false;
4554 } else if (object->IsSmi()) { 4554 } else if (object->IsSmi()) {
4555 Add(SMI); 4555 Add(SMI);
4556 return Smi::cast(*object)->value() != 0; 4556 return Smi::cast(*object)->value() != 0;
4557 } else if (object->IsJSReceiver()) { 4557 } else if (object->IsJSReceiver()) {
4558 Add(SPEC_OBJECT); 4558 Add(SPEC_OBJECT);
4559 return !object->IsUndetectable(); 4559 return !object->IsUndetectable();
4560 } else if (object->IsString()) { 4560 } else if (object->IsString()) {
4561 DCHECK(!object->IsUndetectable()); 4561 DCHECK(!object->IsUndetectable());
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
4778 if (type->Is(Type::UntaggedPointer())) { 4778 if (type->Is(Type::UntaggedPointer())) {
4779 return Representation::External(); 4779 return Representation::External();
4780 } 4780 }
4781 4781
4782 DCHECK(!type->Is(Type::Untagged())); 4782 DCHECK(!type->Is(Type::Untagged()));
4783 return Representation::Tagged(); 4783 return Representation::Tagged();
4784 } 4784 }
4785 4785
4786 } // namespace internal 4786 } // namespace internal
4787 } // namespace v8 4787 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/compiler/access-info.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698