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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 Isolate* isolate = fun->GetIsolate(); | 529 Isolate* isolate = fun->GetIsolate(); |
530 if (receiver->IsNull() || receiver->IsUndefined(isolate) || | 530 if (receiver->IsNull() || receiver->IsUndefined(isolate) || |
531 receiver->IsJSProxy()) { | 531 receiver->IsJSProxy()) { |
532 print_name = true; | 532 print_name = true; |
533 } else if (isolate->context() != nullptr) { | 533 } else if (isolate->context() != nullptr) { |
534 if (!receiver->IsJSObject()) { | 534 if (!receiver->IsJSObject()) { |
535 receiver = receiver->GetRootMap(isolate)->prototype(); | 535 receiver = receiver->GetRootMap(isolate)->prototype(); |
536 } | 536 } |
537 | 537 |
538 for (PrototypeIterator iter(isolate, JSObject::cast(receiver), | 538 for (PrototypeIterator iter(isolate, JSObject::cast(receiver), |
539 PrototypeIterator::START_AT_RECEIVER); | 539 kStartAtReceiver); |
540 !iter.IsAtEnd(); iter.Advance()) { | 540 !iter.IsAtEnd(); iter.Advance()) { |
541 if (iter.GetCurrent()->IsJSProxy()) break; | 541 if (iter.GetCurrent()->IsJSProxy()) break; |
542 Object* key = iter.GetCurrent<JSObject>()->SlowReverseLookup(fun); | 542 Object* key = iter.GetCurrent<JSObject>()->SlowReverseLookup(fun); |
543 if (!key->IsUndefined(isolate)) { | 543 if (!key->IsUndefined(isolate)) { |
544 if (!name->IsString() || | 544 if (!name->IsString() || |
545 !key->IsString() || | 545 !key->IsString() || |
546 !String::cast(name)->Equals(String::cast(key))) { | 546 !String::cast(name)->Equals(String::cast(key))) { |
547 print_name = true; | 547 print_name = true; |
548 } | 548 } |
549 if (name->IsString() && String::cast(name)->length() == 0) { | 549 if (name->IsString() && String::cast(name)->length() == 0) { |
(...skipping 28 matching lines...) Expand all Loading... |
578 MemCopy(new_space, space_, *bytes); | 578 MemCopy(new_space, space_, *bytes); |
579 *bytes = new_bytes; | 579 *bytes = new_bytes; |
580 DeleteArray(space_); | 580 DeleteArray(space_); |
581 space_ = new_space; | 581 space_ = new_space; |
582 return new_space; | 582 return new_space; |
583 } | 583 } |
584 | 584 |
585 | 585 |
586 } // namespace internal | 586 } // namespace internal |
587 } // namespace v8 | 587 } // namespace v8 |
OLD | NEW |