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

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

Issue 2059173002: Reland of place all remaining Oddball checks with new function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/builtins.cc ('k') | src/compiler/access-info.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 // 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 4484 matching lines...) Expand 10 before | Expand all | Expand 10 after
4495 return os << ")"; 4495 return os << ")";
4496 } 4496 }
4497 4497
4498 bool ToBooleanICStub::Types::UpdateStatus(Isolate* isolate, 4498 bool ToBooleanICStub::Types::UpdateStatus(Isolate* isolate,
4499 Handle<Object> object) { 4499 Handle<Object> object) {
4500 if (object->IsUndefined(isolate)) { 4500 if (object->IsUndefined(isolate)) {
4501 Add(UNDEFINED); 4501 Add(UNDEFINED);
4502 return false; 4502 return false;
4503 } else if (object->IsBoolean()) { 4503 } else if (object->IsBoolean()) {
4504 Add(BOOLEAN); 4504 Add(BOOLEAN);
4505 return object->IsTrue(); 4505 return object->IsTrue(isolate);
4506 } else if (object->IsNull()) { 4506 } else if (object->IsNull(isolate)) {
4507 Add(NULL_TYPE); 4507 Add(NULL_TYPE);
4508 return false; 4508 return false;
4509 } else if (object->IsSmi()) { 4509 } else if (object->IsSmi()) {
4510 Add(SMI); 4510 Add(SMI);
4511 return Smi::cast(*object)->value() != 0; 4511 return Smi::cast(*object)->value() != 0;
4512 } else if (object->IsJSReceiver()) { 4512 } else if (object->IsJSReceiver()) {
4513 Add(SPEC_OBJECT); 4513 Add(SPEC_OBJECT);
4514 return !object->IsUndetectable(); 4514 return !object->IsUndetectable();
4515 } else if (object->IsString()) { 4515 } else if (object->IsString()) {
4516 DCHECK(!object->IsUndetectable()); 4516 DCHECK(!object->IsUndetectable());
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
4718 if (type->Is(Type::UntaggedPointer())) { 4718 if (type->Is(Type::UntaggedPointer())) {
4719 return Representation::External(); 4719 return Representation::External();
4720 } 4720 }
4721 4721
4722 DCHECK(!type->Is(Type::Untagged())); 4722 DCHECK(!type->Is(Type::Untagged()));
4723 return Representation::Tagged(); 4723 return Representation::Tagged();
4724 } 4724 }
4725 4725
4726 } // namespace internal 4726 } // namespace internal
4727 } // namespace v8 4727 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/compiler/access-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698