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

Side by Side Diff: src/string-stream.cc

Issue 2466553002: [ic] Simplify handling of primitive maps. (Closed)
Patch Set: Now with enabled data-drived ICs Created 4 years, 1 month 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/prototype.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <memory> 7 #include <memory>
8 8
9 #include "src/handles-inl.h" 9 #include "src/handles-inl.h"
10 #include "src/prototype.h" 10 #include "src/prototype.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 void StringStream::PrintPrototype(JSFunction* fun, Object* receiver) { 527 void StringStream::PrintPrototype(JSFunction* fun, Object* receiver) {
528 Object* name = fun->shared()->name(); 528 Object* name = fun->shared()->name();
529 bool print_name = false; 529 bool print_name = false;
530 Isolate* isolate = fun->GetIsolate(); 530 Isolate* isolate = fun->GetIsolate();
531 if (receiver->IsNull(isolate) || receiver->IsUndefined(isolate) || 531 if (receiver->IsNull(isolate) || receiver->IsUndefined(isolate) ||
532 receiver->IsTheHole(isolate) || receiver->IsJSProxy()) { 532 receiver->IsTheHole(isolate) || receiver->IsJSProxy()) {
533 print_name = true; 533 print_name = true;
534 } else if (isolate->context() != nullptr) { 534 } else if (isolate->context() != nullptr) {
535 if (!receiver->IsJSObject()) { 535 if (!receiver->IsJSObject()) {
536 receiver = receiver->GetRootMap(isolate)->prototype(); 536 receiver = receiver->GetPrototypeChainRootMap(isolate)->prototype();
537 } 537 }
538 538
539 for (PrototypeIterator iter(isolate, JSObject::cast(receiver), 539 for (PrototypeIterator iter(isolate, JSObject::cast(receiver),
540 kStartAtReceiver); 540 kStartAtReceiver);
541 !iter.IsAtEnd(); iter.Advance()) { 541 !iter.IsAtEnd(); iter.Advance()) {
542 if (iter.GetCurrent()->IsJSProxy()) break; 542 if (iter.GetCurrent()->IsJSProxy()) break;
543 Object* key = iter.GetCurrent<JSObject>()->SlowReverseLookup(fun); 543 Object* key = iter.GetCurrent<JSObject>()->SlowReverseLookup(fun);
544 if (!key->IsUndefined(isolate)) { 544 if (!key->IsUndefined(isolate)) {
545 if (!name->IsString() || 545 if (!name->IsString() ||
546 !key->IsString() || 546 !key->IsString() ||
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 MemCopy(new_space, space_, *bytes); 579 MemCopy(new_space, space_, *bytes);
580 *bytes = new_bytes; 580 *bytes = new_bytes;
581 DeleteArray(space_); 581 DeleteArray(space_);
582 space_ = new_space; 582 space_ = new_space;
583 return new_space; 583 return new_space;
584 } 584 }
585 585
586 586
587 } // namespace internal 587 } // namespace internal
588 } // namespace v8 588 } // namespace v8
OLDNEW
« no previous file with comments | « src/prototype.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698