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

Side by Side Diff: src/api.cc

Issue 2036493006: Keep prototype maps in dictionary mode until ICs see them (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make ignition tests happy Created 4 years, 6 months 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 | « no previous file | src/builtins.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 3831 matching lines...) Expand 10 before | Expand all | Expand 10 after
3842 bool v8::Object::SetPrototype(Local<Value> value) { 3842 bool v8::Object::SetPrototype(Local<Value> value) {
3843 auto context = ContextFromHeapObject(Utils::OpenHandle(this)); 3843 auto context = ContextFromHeapObject(Utils::OpenHandle(this));
3844 return SetPrototype(context, value).FromMaybe(false); 3844 return SetPrototype(context, value).FromMaybe(false);
3845 } 3845 }
3846 3846
3847 3847
3848 Local<Object> v8::Object::FindInstanceInPrototypeChain( 3848 Local<Object> v8::Object::FindInstanceInPrototypeChain(
3849 v8::Local<FunctionTemplate> tmpl) { 3849 v8::Local<FunctionTemplate> tmpl) {
3850 auto isolate = Utils::OpenHandle(this)->GetIsolate(); 3850 auto isolate = Utils::OpenHandle(this)->GetIsolate();
3851 i::PrototypeIterator iter(isolate, *Utils::OpenHandle(this), 3851 i::PrototypeIterator iter(isolate, *Utils::OpenHandle(this),
3852 i::PrototypeIterator::START_AT_RECEIVER); 3852 i::kStartAtReceiver);
3853 auto tmpl_info = *Utils::OpenHandle(*tmpl); 3853 auto tmpl_info = *Utils::OpenHandle(*tmpl);
3854 while (!tmpl_info->IsTemplateFor(iter.GetCurrent())) { 3854 while (!tmpl_info->IsTemplateFor(iter.GetCurrent())) {
3855 iter.Advance(); 3855 iter.Advance();
3856 if (iter.IsAtEnd()) { 3856 if (iter.IsAtEnd()) {
3857 return Local<Object>(); 3857 return Local<Object>();
3858 } 3858 }
3859 } 3859 }
3860 // IsTemplateFor() ensures that iter.GetCurrent() can't be a Proxy here. 3860 // IsTemplateFor() ensures that iter.GetCurrent() can't be a Proxy here.
3861 return Utils::ToLocal(i::handle(iter.GetCurrent<i::JSObject>(), isolate)); 3861 return Utils::ToLocal(i::handle(iter.GetCurrent<i::JSObject>(), isolate));
3862 } 3862 }
(...skipping 4950 matching lines...) Expand 10 before | Expand all | Expand 10 after
8813 Address callback_address = 8813 Address callback_address =
8814 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8814 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8815 VMState<EXTERNAL> state(isolate); 8815 VMState<EXTERNAL> state(isolate);
8816 ExternalCallbackScope call_scope(isolate, callback_address); 8816 ExternalCallbackScope call_scope(isolate, callback_address);
8817 callback(info); 8817 callback(info);
8818 } 8818 }
8819 8819
8820 8820
8821 } // namespace internal 8821 } // namespace internal
8822 } // namespace v8 8822 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698