OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/string-stream.h" | 5 #include "src/string-stream.h" |
6 | 6 |
7 #include "src/handles-inl.h" | 7 #include "src/handles-inl.h" |
8 #include "src/prototype.h" | 8 #include "src/prototype.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 | 524 |
525 | 525 |
526 void StringStream::PrintPrototype(JSFunction* fun, Object* receiver) { | 526 void StringStream::PrintPrototype(JSFunction* fun, Object* receiver) { |
527 Object* name = fun->shared()->name(); | 527 Object* name = fun->shared()->name(); |
528 bool print_name = false; | 528 bool print_name = false; |
529 Isolate* isolate = fun->GetIsolate(); | 529 Isolate* isolate = fun->GetIsolate(); |
530 for (PrototypeIterator iter(isolate, receiver, | 530 for (PrototypeIterator iter(isolate, receiver, |
531 PrototypeIterator::START_AT_RECEIVER); | 531 PrototypeIterator::START_AT_RECEIVER); |
532 !iter.IsAtEnd(); iter.Advance()) { | 532 !iter.IsAtEnd(); iter.Advance()) { |
533 if (iter.GetCurrent()->IsJSObject()) { | 533 if (iter.GetCurrent()->IsJSObject()) { |
534 Object* key = JSObject::cast(iter.GetCurrent())->SlowReverseLookup(fun); | 534 Object* key = iter.GetCurrent<JSObject>()->SlowReverseLookup(fun); |
535 if (key != isolate->heap()->undefined_value()) { | 535 if (key != isolate->heap()->undefined_value()) { |
536 if (!name->IsString() || | 536 if (!name->IsString() || |
537 !key->IsString() || | 537 !key->IsString() || |
538 !String::cast(name)->Equals(String::cast(key))) { | 538 !String::cast(name)->Equals(String::cast(key))) { |
539 print_name = true; | 539 print_name = true; |
540 } | 540 } |
541 if (name->IsString() && String::cast(name)->length() == 0) { | 541 if (name->IsString() && String::cast(name)->length() == 0) { |
542 print_name = false; | 542 print_name = false; |
543 } | 543 } |
544 name = key; | 544 name = key; |
(...skipping 26 matching lines...) Expand all Loading... |
571 MemCopy(new_space, space_, *bytes); | 571 MemCopy(new_space, space_, *bytes); |
572 *bytes = new_bytes; | 572 *bytes = new_bytes; |
573 DeleteArray(space_); | 573 DeleteArray(space_); |
574 space_ = new_space; | 574 space_ = new_space; |
575 return new_space; | 575 return new_space; |
576 } | 576 } |
577 | 577 |
578 | 578 |
579 } // namespace internal | 579 } // namespace internal |
580 } // namespace v8 | 580 } // namespace v8 |
OLD | NEW |