| OLD | NEW | 
|---|
| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 308 // static | 308 // static | 
| 309 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime( | 309 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime( | 
| 310     Isolate* isolate, const BinaryOpICState& state) { | 310     Isolate* isolate, const BinaryOpICState& state) { | 
| 311   if (state.CouldCreateAllocationMementos()) { | 311   if (state.CouldCreateAllocationMementos()) { | 
| 312     BinaryOpICWithAllocationSiteStub stub(isolate, state); | 312     BinaryOpICWithAllocationSiteStub stub(isolate, state); | 
| 313     stub.GetCode(); | 313     stub.GetCode(); | 
| 314   } | 314   } | 
| 315 } | 315 } | 
| 316 | 316 | 
| 317 | 317 | 
|  | 318 std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags) { | 
|  | 319   switch (flags) { | 
|  | 320     case STRING_ADD_CHECK_NONE: | 
|  | 321       return os << "CheckNone"; | 
|  | 322     case STRING_ADD_CHECK_LEFT: | 
|  | 323       return os << "CheckLeft"; | 
|  | 324     case STRING_ADD_CHECK_RIGHT: | 
|  | 325       return os << "CheckRight"; | 
|  | 326     case STRING_ADD_CHECK_BOTH: | 
|  | 327       return os << "CheckBoth"; | 
|  | 328   } | 
|  | 329   UNREACHABLE(); | 
|  | 330   return os; | 
|  | 331 } | 
|  | 332 | 
|  | 333 | 
| 318 void StringAddStub::PrintBaseName(std::ostream& os) const {  // NOLINT | 334 void StringAddStub::PrintBaseName(std::ostream& os) const {  // NOLINT | 
| 319   os << "StringAddStub"; | 335   os << "StringAddStub_" << flags() << "_" << pretenure_flag(); | 
| 320   if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) { |  | 
| 321     os << "_CheckBoth"; |  | 
| 322   } else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) { |  | 
| 323     os << "_CheckLeft"; |  | 
| 324   } else if ((flags() & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) { |  | 
| 325     os << "_CheckRight"; |  | 
| 326   } |  | 
| 327   if (pretenure_flag() == TENURED) { |  | 
| 328     os << "_Tenured"; |  | 
| 329   } |  | 
| 330 } | 336 } | 
| 331 | 337 | 
| 332 | 338 | 
|  | 339 void StringAddTFStub::PrintBaseName(std::ostream& os) const {  // NOLINT | 
|  | 340   os << "StringAddTFStub_" << flags() << "_" << pretenure_flag(); | 
|  | 341 } | 
|  | 342 | 
|  | 343 | 
| 333 InlineCacheState CompareICStub::GetICState() const { | 344 InlineCacheState CompareICStub::GetICState() const { | 
| 334   CompareICState::State state = Max(left(), right()); | 345   CompareICState::State state = Max(left(), right()); | 
| 335   switch (state) { | 346   switch (state) { | 
| 336     case CompareICState::UNINITIALIZED: | 347     case CompareICState::UNINITIALIZED: | 
| 337       return ::v8::internal::UNINITIALIZED; | 348       return ::v8::internal::UNINITIALIZED; | 
| 338     case CompareICState::SMI: | 349     case CompareICState::SMI: | 
| 339     case CompareICState::NUMBER: | 350     case CompareICState::NUMBER: | 
| 340     case CompareICState::INTERNALIZED_STRING: | 351     case CompareICState::INTERNALIZED_STRING: | 
| 341     case CompareICState::STRING: | 352     case CompareICState::STRING: | 
| 342     case CompareICState::UNIQUE_NAME: | 353     case CompareICState::UNIQUE_NAME: | 
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1014 } | 1025 } | 
| 1015 | 1026 | 
| 1016 | 1027 | 
| 1017 InternalArrayConstructorStub::InternalArrayConstructorStub( | 1028 InternalArrayConstructorStub::InternalArrayConstructorStub( | 
| 1018     Isolate* isolate) : PlatformCodeStub(isolate) { | 1029     Isolate* isolate) : PlatformCodeStub(isolate) { | 
| 1019   InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 1030   InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 
| 1020 } | 1031 } | 
| 1021 | 1032 | 
| 1022 | 1033 | 
| 1023 } }  // namespace v8::internal | 1034 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|