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

Side by Side Diff: src/ic/handler-compiler.cc

Issue 880333003: Load API accessor from descriptor instead of embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 Created 5 years, 10 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 | « src/ic/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/ic/ic-inl.h" 10 #include "src/ic/ic-inl.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( 223 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
224 Handle<Name> name, Handle<ExecutableAccessorInfo> callback) { 224 Handle<Name> name, Handle<ExecutableAccessorInfo> callback) {
225 Register reg = Frontend(name); 225 Register reg = Frontend(name);
226 GenerateLoadCallback(reg, callback); 226 GenerateLoadCallback(reg, callback);
227 return GetCode(kind(), Code::FAST, name); 227 return GetCode(kind(), Code::FAST, name);
228 } 228 }
229 229
230 230
231 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( 231 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
232 Handle<Name> name, const CallOptimization& call_optimization) { 232 Handle<Name> name, const CallOptimization& call_optimization,
233 int accessor_index) {
233 DCHECK(call_optimization.is_simple_api_call()); 234 DCHECK(call_optimization.is_simple_api_call());
234 Frontend(name); 235 Register holder = Frontend(name);
235 Handle<Map> receiver_map = IC::TypeToMap(*type(), isolate()); 236 Handle<Map> receiver_map = IC::TypeToMap(*type(), isolate());
236 GenerateApiAccessorCall(masm(), call_optimization, receiver_map, receiver(), 237 GenerateApiAccessorCall(masm(), call_optimization, receiver_map, receiver(),
237 scratch1(), false, no_reg); 238 scratch2(), false, no_reg, holder, accessor_index);
238 return GetCode(kind(), Code::FAST, name); 239 return GetCode(kind(), Code::FAST, name);
239 } 240 }
240 241
241 242
242 void NamedLoadHandlerCompiler::InterceptorVectorSlotPush(Register holder_reg) { 243 void NamedLoadHandlerCompiler::InterceptorVectorSlotPush(Register holder_reg) {
243 if (IC::ICUseVector(kind())) { 244 if (IC::ICUseVector(kind())) {
244 if (holder_reg.is(receiver())) { 245 if (holder_reg.is(receiver())) {
245 PushVectorAndSlot(); 246 PushVectorAndSlot();
246 } else { 247 } else {
247 DCHECK(holder_reg.is(scratch1())); 248 DCHECK(holder_reg.is(scratch1()));
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 Register holder = Frontend(name); 448 Register holder = Frontend(name);
448 GenerateStoreViaSetter(masm(), type(), receiver(), holder, accessor_index, 449 GenerateStoreViaSetter(masm(), type(), receiver(), holder, accessor_index,
449 expected_arguments); 450 expected_arguments);
450 451
451 return GetCode(kind(), Code::FAST, name); 452 return GetCode(kind(), Code::FAST, name);
452 } 453 }
453 454
454 455
455 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( 456 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
456 Handle<JSObject> object, Handle<Name> name, 457 Handle<JSObject> object, Handle<Name> name,
457 const CallOptimization& call_optimization) { 458 const CallOptimization& call_optimization, int accessor_index) {
458 Frontend(name); 459 Register holder = Frontend(name);
459 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), 460 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()),
460 receiver(), scratch1(), true, value()); 461 receiver(), scratch2(), true, value(), holder,
462 accessor_index);
461 return GetCode(kind(), Code::FAST, name); 463 return GetCode(kind(), Code::FAST, name);
462 } 464 }
463 465
464 466
465 #undef __ 467 #undef __
466 468
467 469
468 void ElementHandlerCompiler::CompileElementHandlers( 470 void ElementHandlerCompiler::CompileElementHandlers(
469 MapHandleList* receiver_maps, CodeHandleList* handlers) { 471 MapHandleList* receiver_maps, CodeHandleList* handlers) {
470 for (int i = 0; i < receiver_maps->length(); ++i) { 472 for (int i = 0; i < receiver_maps->length(); ++i) {
(...skipping 20 matching lines...) Expand all
491 DCHECK(elements_kind == DICTIONARY_ELEMENTS); 493 DCHECK(elements_kind == DICTIONARY_ELEMENTS);
492 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); 494 cached_stub = LoadDictionaryElementStub(isolate()).GetCode();
493 } 495 }
494 } 496 }
495 497
496 handlers->Add(cached_stub); 498 handlers->Add(cached_stub);
497 } 499 }
498 } 500 }
499 } 501 }
500 } // namespace v8::internal 502 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698