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

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

Issue 1347063004: [ic] Introduce BOOLEAN state for CompareIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/code-stubs.h ('k') | src/hydrogen.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/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 void StringAddTFStub::PrintBaseName(std::ostream& os) const { // NOLINT 344 void StringAddTFStub::PrintBaseName(std::ostream& os) const { // NOLINT
345 os << "StringAddTFStub_" << flags() << "_" << pretenure_flag(); 345 os << "StringAddTFStub_" << flags() << "_" << pretenure_flag();
346 } 346 }
347 347
348 348
349 InlineCacheState CompareICStub::GetICState() const { 349 InlineCacheState CompareICStub::GetICState() const {
350 CompareICState::State state = Max(left(), right()); 350 CompareICState::State state = Max(left(), right());
351 switch (state) { 351 switch (state) {
352 case CompareICState::UNINITIALIZED: 352 case CompareICState::UNINITIALIZED:
353 return ::v8::internal::UNINITIALIZED; 353 return ::v8::internal::UNINITIALIZED;
354 case CompareICState::BOOLEAN:
354 case CompareICState::SMI: 355 case CompareICState::SMI:
355 case CompareICState::NUMBER: 356 case CompareICState::NUMBER:
356 case CompareICState::INTERNALIZED_STRING: 357 case CompareICState::INTERNALIZED_STRING:
357 case CompareICState::STRING: 358 case CompareICState::STRING:
358 case CompareICState::UNIQUE_NAME: 359 case CompareICState::UNIQUE_NAME:
359 case CompareICState::OBJECT: 360 case CompareICState::OBJECT:
360 case CompareICState::KNOWN_OBJECT: 361 case CompareICState::KNOWN_OBJECT:
361 return MONOMORPHIC; 362 return MONOMORPHIC;
362 case CompareICState::GENERIC: 363 case CompareICState::GENERIC:
363 return ::v8::internal::GENERIC; 364 return ::v8::internal::GENERIC;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 410 }
410 return false; 411 return false;
411 } 412 }
412 413
413 414
414 void CompareICStub::Generate(MacroAssembler* masm) { 415 void CompareICStub::Generate(MacroAssembler* masm) {
415 switch (state()) { 416 switch (state()) {
416 case CompareICState::UNINITIALIZED: 417 case CompareICState::UNINITIALIZED:
417 GenerateMiss(masm); 418 GenerateMiss(masm);
418 break; 419 break;
420 case CompareICState::BOOLEAN:
421 GenerateBooleans(masm);
422 break;
419 case CompareICState::SMI: 423 case CompareICState::SMI:
420 GenerateSmis(masm); 424 GenerateSmis(masm);
421 break; 425 break;
422 case CompareICState::NUMBER: 426 case CompareICState::NUMBER:
423 GenerateNumbers(masm); 427 GenerateNumbers(masm);
424 break; 428 break;
425 case CompareICState::STRING: 429 case CompareICState::STRING:
426 GenerateStrings(masm); 430 GenerateStrings(masm);
427 break; 431 break;
428 case CompareICState::INTERNALIZED_STRING: 432 case CompareICState::INTERNALIZED_STRING:
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 1059
1056 if (type->Is(Type::UntaggedPointer())) { 1060 if (type->Is(Type::UntaggedPointer())) {
1057 return Representation::External(); 1061 return Representation::External();
1058 } 1062 }
1059 1063
1060 DCHECK(!type->Is(Type::Untagged())); 1064 DCHECK(!type->Is(Type::Untagged()));
1061 return Representation::Tagged(); 1065 return Representation::Tagged();
1062 } 1066 }
1063 } // namespace internal 1067 } // namespace internal
1064 } // namespace v8 1068 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698