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

Side by Side Diff: src/objects.cc

Issue 1778493005: Inline calling into the interceptor into the IC callbacks rather than going through the LookupItera… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 16291 matching lines...) Expand 10 before | Expand all | Expand 10 after
16302 for (int i = 0; i < capacity; i++) { 16302 for (int i = 0; i < capacity; i++) {
16303 Object* k = this->KeyAt(i); 16303 Object* k = this->KeyAt(i);
16304 if (this->IsKey(k)) { 16304 if (this->IsKey(k)) {
16305 elements->set(pos++, this->ValueAt(i), mode); 16305 elements->set(pos++, this->ValueAt(i), mode);
16306 } 16306 }
16307 } 16307 }
16308 DCHECK(pos == elements->length()); 16308 DCHECK(pos == elements->length());
16309 } 16309 }
16310 16310
16311 16311
16312 InterceptorInfo* JSObject::GetNamedInterceptor() {
16313 DCHECK(map()->has_named_interceptor());
16314 JSFunction* constructor = JSFunction::cast(map()->GetConstructor());
16315 DCHECK(constructor->shared()->IsApiFunction());
16316 Object* result =
16317 constructor->shared()->get_api_func_data()->named_property_handler();
16318 return InterceptorInfo::cast(result);
16319 }
16320
16321
16322 MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(LookupIterator* it, 16312 MaybeHandle<Object> JSObject::GetPropertyWithInterceptor(LookupIterator* it,
16323 bool* done) { 16313 bool* done) {
16324 *done = false; 16314 *done = false;
16325 Isolate* isolate = it->isolate(); 16315 Isolate* isolate = it->isolate();
16326 // Make sure that the top context does not change when doing callbacks or 16316 // Make sure that the top context does not change when doing callbacks or
16327 // interceptor calls. 16317 // interceptor calls.
16328 AssertNoContextChange ncc(isolate); 16318 AssertNoContextChange ncc(isolate);
16329 16319
16330 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); 16320 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state());
16331 Handle<InterceptorInfo> interceptor = it->GetInterceptor(); 16321 Handle<InterceptorInfo> interceptor = it->GetInterceptor();
(...skipping 3518 matching lines...) Expand 10 before | Expand all | Expand 10 after
19850 if (cell->value() != *new_value) { 19840 if (cell->value() != *new_value) {
19851 cell->set_value(*new_value); 19841 cell->set_value(*new_value);
19852 Isolate* isolate = cell->GetIsolate(); 19842 Isolate* isolate = cell->GetIsolate();
19853 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19843 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19854 isolate, DependentCode::kPropertyCellChangedGroup); 19844 isolate, DependentCode::kPropertyCellChangedGroup);
19855 } 19845 }
19856 } 19846 }
19857 19847
19858 } // namespace internal 19848 } // namespace internal
19859 } // namespace v8 19849 } // namespace v8
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698