OLD | NEW |
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 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2494 | 2494 |
2495 void HEnterInlined::RegisterReturnTarget(HBasicBlock* return_target, | 2495 void HEnterInlined::RegisterReturnTarget(HBasicBlock* return_target, |
2496 Zone* zone) { | 2496 Zone* zone) { |
2497 ASSERT(return_target->IsInlineReturnTarget()); | 2497 ASSERT(return_target->IsInlineReturnTarget()); |
2498 return_targets_.Add(return_target, zone); | 2498 return_targets_.Add(return_target, zone); |
2499 } | 2499 } |
2500 | 2500 |
2501 | 2501 |
2502 void HEnterInlined::PrintDataTo(StringStream* stream) { | 2502 void HEnterInlined::PrintDataTo(StringStream* stream) { |
2503 SmartArrayPointer<char> name = function()->debug_name()->ToCString(); | 2503 SmartArrayPointer<char> name = function()->debug_name()->ToCString(); |
2504 stream->Add("%s, id=%d", *name, function()->id().ToInt()); | 2504 stream->Add("%s, id=%d", name.get(), function()->id().ToInt()); |
2505 } | 2505 } |
2506 | 2506 |
2507 | 2507 |
2508 static bool IsInteger32(double value) { | 2508 static bool IsInteger32(double value) { |
2509 double roundtrip_value = static_cast<double>(static_cast<int32_t>(value)); | 2509 double roundtrip_value = static_cast<double>(static_cast<int32_t>(value)); |
2510 return BitCast<int64_t>(roundtrip_value) == BitCast<int64_t>(value); | 2510 return BitCast<int64_t>(roundtrip_value) == BitCast<int64_t>(value); |
2511 } | 2511 } |
2512 | 2512 |
2513 | 2513 |
2514 HConstant::HConstant(Handle<Object> handle, Representation r) | 2514 HConstant::HConstant(Handle<Object> handle, Representation r) |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3105 DependentCode::kPrototypeCheckGroup, info); | 3105 DependentCode::kPrototypeCheckGroup, info); |
3106 } | 3106 } |
3107 } | 3107 } |
3108 return check_map; | 3108 return check_map; |
3109 } | 3109 } |
3110 | 3110 |
3111 | 3111 |
3112 void HLoadNamedGeneric::PrintDataTo(StringStream* stream) { | 3112 void HLoadNamedGeneric::PrintDataTo(StringStream* stream) { |
3113 object()->PrintNameTo(stream); | 3113 object()->PrintNameTo(stream); |
3114 stream->Add("."); | 3114 stream->Add("."); |
3115 stream->Add(*String::cast(*name())->ToCString()); | 3115 stream->Add(String::cast(*name())->ToCString().get()); |
3116 } | 3116 } |
3117 | 3117 |
3118 | 3118 |
3119 void HLoadKeyed::PrintDataTo(StringStream* stream) { | 3119 void HLoadKeyed::PrintDataTo(StringStream* stream) { |
3120 if (!is_external()) { | 3120 if (!is_external()) { |
3121 elements()->PrintNameTo(stream); | 3121 elements()->PrintNameTo(stream); |
3122 } else { | 3122 } else { |
3123 ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && | 3123 ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && |
3124 elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND); | 3124 elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND); |
3125 elements()->PrintNameTo(stream); | 3125 elements()->PrintNameTo(stream); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3243 } | 3243 } |
3244 | 3244 |
3245 return this; | 3245 return this; |
3246 } | 3246 } |
3247 | 3247 |
3248 | 3248 |
3249 void HStoreNamedGeneric::PrintDataTo(StringStream* stream) { | 3249 void HStoreNamedGeneric::PrintDataTo(StringStream* stream) { |
3250 object()->PrintNameTo(stream); | 3250 object()->PrintNameTo(stream); |
3251 stream->Add("."); | 3251 stream->Add("."); |
3252 ASSERT(name()->IsString()); | 3252 ASSERT(name()->IsString()); |
3253 stream->Add(*String::cast(*name())->ToCString()); | 3253 stream->Add(String::cast(*name())->ToCString().get()); |
3254 stream->Add(" = "); | 3254 stream->Add(" = "); |
3255 value()->PrintNameTo(stream); | 3255 value()->PrintNameTo(stream); |
3256 } | 3256 } |
3257 | 3257 |
3258 | 3258 |
3259 void HStoreNamedField::PrintDataTo(StringStream* stream) { | 3259 void HStoreNamedField::PrintDataTo(StringStream* stream) { |
3260 object()->PrintNameTo(stream); | 3260 object()->PrintNameTo(stream); |
3261 access_.PrintTo(stream); | 3261 access_.PrintTo(stream); |
3262 stream->Add(" = "); | 3262 stream->Add(" = "); |
3263 value()->PrintNameTo(stream); | 3263 value()->PrintNameTo(stream); |
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4395 stream->Add("%length"); | 4395 stream->Add("%length"); |
4396 break; | 4396 break; |
4397 case kElementsPointer: | 4397 case kElementsPointer: |
4398 stream->Add("%elements"); | 4398 stream->Add("%elements"); |
4399 break; | 4399 break; |
4400 case kMaps: | 4400 case kMaps: |
4401 stream->Add("%map"); | 4401 stream->Add("%map"); |
4402 break; | 4402 break; |
4403 case kDouble: // fall through | 4403 case kDouble: // fall through |
4404 case kInobject: | 4404 case kInobject: |
4405 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 4405 if (!name_.is_null()) { |
| 4406 stream->Add(String::cast(*name_)->ToCString().get()); |
| 4407 } |
4406 stream->Add("[in-object]"); | 4408 stream->Add("[in-object]"); |
4407 break; | 4409 break; |
4408 case kBackingStore: | 4410 case kBackingStore: |
4409 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); | 4411 if (!name_.is_null()) { |
| 4412 stream->Add(String::cast(*name_)->ToCString().get()); |
| 4413 } |
4410 stream->Add("[backing-store]"); | 4414 stream->Add("[backing-store]"); |
4411 break; | 4415 break; |
4412 case kExternalMemory: | 4416 case kExternalMemory: |
4413 stream->Add("[external-memory]"); | 4417 stream->Add("[external-memory]"); |
4414 break; | 4418 break; |
4415 } | 4419 } |
4416 | 4420 |
4417 stream->Add("@%d", offset()); | 4421 stream->Add("@%d", offset()); |
4418 } | 4422 } |
4419 | 4423 |
4420 } } // namespace v8::internal | 4424 } } // namespace v8::internal |
OLD | NEW |