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

Side by Side Diff: src/stub-cache.cc

Issue 96083005: Remove Reloc::Mode CODE_TARGET_CONTEXT (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/full-codegen-x64.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // prototype cannot hold multiple handlers, one for each of the string maps, 139 // prototype cannot hold multiple handlers, one for each of the string maps,
140 // for a single name. Hence, turn off caching of the IC. 140 // for a single name. Hence, turn off caching of the IC.
141 bool can_be_cached = !type->Is(Type::String()); 141 bool can_be_cached = !type->Is(Type::String());
142 if (can_be_cached) { 142 if (can_be_cached) {
143 stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate()); 143 stub_holder = IC::GetCodeCacheHolder(flag, *type, isolate());
144 ic = FindIC(name, stub_holder, kind, extra_ic_state, flag); 144 ic = FindIC(name, stub_holder, kind, extra_ic_state, flag);
145 if (!ic.is_null()) return ic; 145 if (!ic.is_null()) return ic;
146 } 146 }
147 147
148 if (kind == Code::LOAD_IC) { 148 if (kind == Code::LOAD_IC) {
149 LoadStubCompiler ic_compiler(isolate(), flag); 149 LoadStubCompiler ic_compiler(isolate(), extra_ic_state, flag);
150 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 150 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
151 } else if (kind == Code::KEYED_LOAD_IC) { 151 } else if (kind == Code::KEYED_LOAD_IC) {
152 KeyedLoadStubCompiler ic_compiler(isolate(), flag); 152 KeyedLoadStubCompiler ic_compiler(isolate(), extra_ic_state, flag);
153 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 153 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
154 } else if (kind == Code::STORE_IC) { 154 } else if (kind == Code::STORE_IC) {
155 StoreStubCompiler ic_compiler(isolate(), extra_ic_state); 155 StoreStubCompiler ic_compiler(isolate(), extra_ic_state);
156 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 156 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
157 } else { 157 } else {
158 ASSERT(kind == Code::KEYED_STORE_IC); 158 ASSERT(kind == Code::KEYED_STORE_IC);
159 ASSERT(STANDARD_STORE == 159 ASSERT(STANDARD_STORE ==
160 KeyedStoreIC::GetKeyedAccessStoreMode(extra_ic_state)); 160 KeyedStoreIC::GetKeyedAccessStoreMode(extra_ic_state));
161 KeyedStoreStubCompiler ic_compiler(isolate(), extra_ic_state); 161 KeyedStoreStubCompiler ic_compiler(isolate(), extra_ic_state);
162 ic = ic_compiler.CompileMonomorphicIC(type, handler, name); 162 ic = ic_compiler.CompileMonomorphicIC(type, handler, name);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 static void FillCache(Isolate* isolate, Handle<Code> code) { 411 static void FillCache(Isolate* isolate, Handle<Code> code) {
412 Handle<UnseededNumberDictionary> dictionary = 412 Handle<UnseededNumberDictionary> dictionary =
413 UnseededNumberDictionary::Set(isolate->factory()->non_monomorphic_cache(), 413 UnseededNumberDictionary::Set(isolate->factory()->non_monomorphic_cache(),
414 code->flags(), 414 code->flags(),
415 code); 415 code);
416 isolate->heap()->public_set_non_monomorphic_cache(*dictionary); 416 isolate->heap()->public_set_non_monomorphic_cache(*dictionary);
417 } 417 }
418 418
419 419
420 Code* StubCache::FindCallInitialize(int argc, 420 Code* StubCache::FindCallInitialize(int argc,
421 RelocInfo::Mode mode, 421 ContextualMode mode,
422 Code::Kind kind) { 422 Code::Kind kind) {
423 ExtraICState extra_state = 423 ExtraICState extra_state =
424 CallICBase::StringStubState::encode(DEFAULT_STRING_STUB) | 424 CallICBase::StringStubState::encode(DEFAULT_STRING_STUB) |
425 CallICBase::Contextual::encode(mode == RelocInfo::CODE_TARGET_CONTEXT 425 CallICBase::Contextual::encode(mode);
426 ? CONTEXTUAL : NOT_CONTEXTUAL);
427 Code::Flags flags = 426 Code::Flags flags =
428 Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc); 427 Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc);
429 UnseededNumberDictionary* dictionary = 428 UnseededNumberDictionary* dictionary =
430 isolate()->heap()->non_monomorphic_cache(); 429 isolate()->heap()->non_monomorphic_cache();
431 int entry = dictionary->FindEntry(isolate(), flags); 430 int entry = dictionary->FindEntry(isolate(), flags);
432 ASSERT(entry != -1); 431 ASSERT(entry != -1);
433 Object* code = dictionary->ValueAt(entry); 432 Object* code = dictionary->ValueAt(entry);
434 // This might be called during the marking phase of the collector 433 // This might be called during the marking phase of the collector
435 // hence the unchecked cast. 434 // hence the unchecked cast.
436 return reinterpret_cast<Code*>(code); 435 return reinterpret_cast<Code*>(code);
437 } 436 }
438 437
439 438
439 Code* StubCache::FindPreMonomorphicIC(Code::Kind kind, ExtraICState state) {
440 Code::Flags flags = Code::ComputeFlags(kind, PREMONOMORPHIC, state);
441 UnseededNumberDictionary* dictionary =
442 isolate()->heap()->non_monomorphic_cache();
443 int entry = dictionary->FindEntry(isolate(), flags);
444 ASSERT(entry != -1);
445 Object* code = dictionary->ValueAt(entry);
446 // This might be called during the marking phase of the collector
447 // hence the unchecked cast.
448 return reinterpret_cast<Code*>(code);
449 }
450
451
440 Handle<Code> StubCache::ComputeCallInitialize(int argc, 452 Handle<Code> StubCache::ComputeCallInitialize(int argc,
441 RelocInfo::Mode mode, 453 ContextualMode mode,
442 Code::Kind kind) { 454 Code::Kind kind) {
443 ExtraICState extra_state = 455 ExtraICState extra_state =
444 CallICBase::StringStubState::encode(DEFAULT_STRING_STUB) | 456 CallICBase::ComputeExtraICState(mode, DEFAULT_STRING_STUB);
445 CallICBase::Contextual::encode(mode == RelocInfo::CODE_TARGET_CONTEXT
446 ? CONTEXTUAL : NOT_CONTEXTUAL);
447 Code::Flags flags = 457 Code::Flags flags =
448 Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc); 458 Code::ComputeFlags(kind, UNINITIALIZED, extra_state, Code::NORMAL, argc);
449 Handle<UnseededNumberDictionary> cache = 459 Handle<UnseededNumberDictionary> cache =
450 isolate_->factory()->non_monomorphic_cache(); 460 isolate_->factory()->non_monomorphic_cache();
451 int entry = cache->FindEntry(isolate_, flags); 461 int entry = cache->FindEntry(isolate_, flags);
452 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry))); 462 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry)));
453 463
454 StubCompiler compiler(isolate_); 464 StubCompiler compiler(isolate_);
455 Handle<Code> code = compiler.CompileCallInitialize(flags); 465 Handle<Code> code = compiler.CompileCallInitialize(flags);
456 FillCache(isolate_, code); 466 FillCache(isolate_, code);
457 return code; 467 return code;
458 } 468 }
459 469
460 470
461 Handle<Code> StubCache::ComputeCallInitialize(int argc, RelocInfo::Mode mode) { 471 Handle<Code> StubCache::ComputeCallInitialize(int argc, ContextualMode mode) {
462 return ComputeCallInitialize(argc, mode, Code::CALL_IC); 472 return ComputeCallInitialize(argc, mode, Code::CALL_IC);
463 } 473 }
464 474
465 475
466 Handle<Code> StubCache::ComputeKeyedCallInitialize(int argc) { 476 Handle<Code> StubCache::ComputeKeyedCallInitialize(int argc) {
467 return ComputeCallInitialize(argc, RelocInfo::CODE_TARGET, 477 return ComputeCallInitialize(argc, NOT_CONTEXTUAL, Code::KEYED_CALL_IC);
468 Code::KEYED_CALL_IC);
469 } 478 }
470 479
471 480
472 Handle<Code> StubCache::ComputeCallPreMonomorphic( 481 Handle<Code> StubCache::ComputeCallPreMonomorphic(
473 int argc, 482 int argc,
474 Code::Kind kind, 483 Code::Kind kind,
475 ExtraICState extra_state) { 484 ExtraICState extra_state) {
476 Code::Flags flags = 485 Code::Flags flags =
477 Code::ComputeFlags(kind, PREMONOMORPHIC, extra_state, Code::NORMAL, argc); 486 Code::ComputeFlags(kind, PREMONOMORPHIC, extra_state, Code::NORMAL, argc);
478 Handle<UnseededNumberDictionary> cache = 487 Handle<UnseededNumberDictionary> cache =
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 int entry = cache->FindEntry(isolate_, flags); 541 int entry = cache->FindEntry(isolate_, flags);
533 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry))); 542 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry)));
534 543
535 StubCompiler compiler(isolate_); 544 StubCompiler compiler(isolate_);
536 Handle<Code> code = compiler.CompileCallMegamorphic(flags); 545 Handle<Code> code = compiler.CompileCallMegamorphic(flags);
537 FillCache(isolate_, code); 546 FillCache(isolate_, code);
538 return code; 547 return code;
539 } 548 }
540 549
541 550
551 Handle<Code> StubCache::ComputeLoad(InlineCacheState ic_state,
552 ExtraICState extra_state) {
553 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, ic_state, extra_state);
554 Handle<UnseededNumberDictionary> cache =
555 isolate_->factory()->non_monomorphic_cache();
556 int entry = cache->FindEntry(isolate_, flags);
557 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry)));
558
559 StubCompiler compiler(isolate_);
560 Handle<Code> code;
561 if (ic_state == UNINITIALIZED) {
562 code = compiler.CompileLoadInitialize(flags);
563 } else if (ic_state == PREMONOMORPHIC) {
564 code = compiler.CompileLoadPreMonomorphic(flags);
565 } else if (ic_state == MEGAMORPHIC) {
566 code = compiler.CompileLoadMegamorphic(flags);
567 } else {
568 UNREACHABLE();
569 }
570 FillCache(isolate_, code);
571 return code;
572 }
573
574
575 Handle<Code> StubCache::ComputeStore(InlineCacheState ic_state,
576 ExtraICState extra_state) {
577 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, ic_state, extra_state);
578 Handle<UnseededNumberDictionary> cache =
579 isolate_->factory()->non_monomorphic_cache();
580 int entry = cache->FindEntry(isolate_, flags);
581 if (entry != -1) return Handle<Code>(Code::cast(cache->ValueAt(entry)));
582
583 StubCompiler compiler(isolate_);
584 Handle<Code> code;
585 if (ic_state == UNINITIALIZED) {
586 code = compiler.CompileStoreInitialize(flags);
587 } else if (ic_state == PREMONOMORPHIC) {
588 code = compiler.CompileStorePreMonomorphic(flags);
589 } else if (ic_state == GENERIC) {
590 code = compiler.CompileStoreGeneric(flags);
591 } else if (ic_state == MEGAMORPHIC) {
592 code = compiler.CompileStoreMegamorphic(flags);
593 } else {
594 UNREACHABLE();
595 }
596
597 FillCache(isolate_, code);
598 return code;
599 }
600
601
542 Handle<Code> StubCache::ComputeCallMiss(int argc, 602 Handle<Code> StubCache::ComputeCallMiss(int argc,
543 Code::Kind kind, 603 Code::Kind kind,
544 ExtraICState extra_state) { 604 ExtraICState extra_state) {
545 // MONOMORPHIC_PROTOTYPE_FAILURE state is used to make sure that miss stubs 605 // MONOMORPHIC_PROTOTYPE_FAILURE state is used to make sure that miss stubs
546 // and monomorphic stubs are not mixed up together in the stub cache. 606 // and monomorphic stubs are not mixed up together in the stub cache.
547 Code::Flags flags = 607 Code::Flags flags =
548 Code::ComputeFlags(kind, MONOMORPHIC_PROTOTYPE_FAILURE, extra_state, 608 Code::ComputeFlags(kind, MONOMORPHIC_PROTOTYPE_FAILURE, extra_state,
549 Code::NORMAL, argc, OWN_MAP); 609 Code::NORMAL, argc, OWN_MAP);
550 Handle<UnseededNumberDictionary> cache = 610 Handle<UnseededNumberDictionary> cache =
551 isolate_->factory()->non_monomorphic_cache(); 611 isolate_->factory()->non_monomorphic_cache();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 CodeHandleList* handlers, 670 CodeHandleList* handlers,
611 int number_of_valid_types, 671 int number_of_valid_types,
612 Handle<Name> name, 672 Handle<Name> name,
613 ExtraICState extra_ic_state) { 673 ExtraICState extra_ic_state) {
614 674
615 Handle<Code> handler = handlers->at(0); 675 Handle<Code> handler = handlers->at(0);
616 Code::Kind kind = handler->handler_kind(); 676 Code::Kind kind = handler->handler_kind();
617 Code::StubType type = number_of_valid_types == 1 ? handler->type() 677 Code::StubType type = number_of_valid_types == 1 ? handler->type()
618 : Code::NORMAL; 678 : Code::NORMAL;
619 if (kind == Code::LOAD_IC) { 679 if (kind == Code::LOAD_IC) {
620 LoadStubCompiler ic_compiler(isolate_); 680 LoadStubCompiler ic_compiler(isolate_, extra_ic_state);
621 return ic_compiler.CompilePolymorphicIC( 681 return ic_compiler.CompilePolymorphicIC(
622 types, handlers, name, type, PROPERTY); 682 types, handlers, name, type, PROPERTY);
623 } else { 683 } else {
624 ASSERT(kind == Code::STORE_IC); 684 ASSERT(kind == Code::STORE_IC);
625 StrictModeFlag strict_mode = StoreIC::GetStrictMode(extra_ic_state); 685 StoreStubCompiler ic_compiler(isolate_, extra_ic_state);
626 StoreStubCompiler ic_compiler(isolate_, strict_mode);
627 return ic_compiler.CompilePolymorphicIC( 686 return ic_compiler.CompilePolymorphicIC(
628 types, handlers, name, type, PROPERTY); 687 types, handlers, name, type, PROPERTY);
629 } 688 }
630 } 689 }
631 690
632 691
633 Handle<Code> StubCache::ComputeStoreElementPolymorphic( 692 Handle<Code> StubCache::ComputeStoreElementPolymorphic(
634 MapHandleList* receiver_maps, 693 MapHandleList* receiver_maps,
635 KeyedAccessStoreMode store_mode, 694 KeyedAccessStoreMode store_mode,
636 StrictModeFlag strict_mode) { 695 StrictModeFlag strict_mode) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 } 885 }
827 886
828 887
829 static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) { 888 static MaybeObject* ThrowReferenceError(Isolate* isolate, Name* name) {
830 // If the load is non-contextual, just return the undefined result. 889 // If the load is non-contextual, just return the undefined result.
831 // Note that both keyed and non-keyed loads may end up here, so we 890 // Note that both keyed and non-keyed loads may end up here, so we
832 // can't use either LoadIC or KeyedLoadIC constructors. 891 // can't use either LoadIC or KeyedLoadIC constructors.
833 HandleScope scope(isolate); 892 HandleScope scope(isolate);
834 IC ic(IC::NO_EXTRA_FRAME, isolate); 893 IC ic(IC::NO_EXTRA_FRAME, isolate);
835 ASSERT(ic.IsLoadStub()); 894 ASSERT(ic.IsLoadStub());
836 if (!ic.SlowIsUndeclaredGlobal()) return isolate->heap()->undefined_value(); 895 if (!ic.IsContextual()) {
896 return isolate->heap()->undefined_value();
897 }
837 898
838 // Throw a reference error. 899 // Throw a reference error.
839 Handle<Name> name_handle(name); 900 Handle<Name> name_handle(name);
840 Handle<Object> error = 901 Handle<Object> error =
841 isolate->factory()->NewReferenceError("not_defined", 902 isolate->factory()->NewReferenceError("not_defined",
842 HandleVector(&name_handle, 1)); 903 HandleVector(&name_handle, 1));
843 return isolate->Throw(*error); 904 return isolate->Throw(*error);
844 } 905 }
845 906
846 907
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 Handle<Code> code = GetCodeWithFlags(flags, "CompileCallMegamorphic"); 1080 Handle<Code> code = GetCodeWithFlags(flags, "CompileCallMegamorphic");
1020 isolate()->counters()->call_megamorphic_stubs()->Increment(); 1081 isolate()->counters()->call_megamorphic_stubs()->Increment();
1021 PROFILE(isolate(), 1082 PROFILE(isolate(),
1022 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG), 1083 CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG),
1023 *code, code->arguments_count())); 1084 *code, code->arguments_count()));
1024 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, *code)); 1085 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, *code));
1025 return code; 1086 return code;
1026 } 1087 }
1027 1088
1028 1089
1090 Handle<Code> StubCompiler::CompileLoadInitialize(Code::Flags flags) {
1091 LoadIC::GenerateInitialize(masm());
1092 Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadInitialize");
1093 PROFILE(isolate(),
1094 CodeCreateEvent(Logger::LOAD_INITIALIZE_TAG, *code, 0));
1095 GDBJIT(AddCode(GDBJITInterface::LOAD_IC, *code));
1096 return code;
1097 }
1098
1099
1100 Handle<Code> StubCompiler::CompileLoadPreMonomorphic(Code::Flags flags) {
1101 LoadIC::GeneratePreMonomorphic(masm());
1102 Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadPreMonomorphic");
1103 PROFILE(isolate(),
1104 CodeCreateEvent(Logger::LOAD_PREMONOMORPHIC_TAG, *code, 0));
1105 GDBJIT(AddCode(GDBJITInterface::LOAD_IC, *code));
1106 return code;
1107 }
1108
1109
1110 Handle<Code> StubCompiler::CompileLoadMegamorphic(Code::Flags flags) {
1111 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
1112 ContextualMode mode = IC::GetContextualMode(extra_state);
1113 LoadIC::GenerateMegamorphic(masm(), mode);
1114 Handle<Code> code = GetCodeWithFlags(flags, "CompileLoadMegamorphic");
1115 PROFILE(isolate(),
1116 CodeCreateEvent(Logger::LOAD_MEGAMORPHIC_TAG, *code, 0));
1117 GDBJIT(AddCode(GDBJITInterface::LOAD_IC, *code));
1118 return code;
1119 }
1120
1121
1122 Handle<Code> StubCompiler::CompileStoreInitialize(Code::Flags flags) {
1123 StoreIC::GenerateInitialize(masm());
1124 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreInitialize");
1125 PROFILE(isolate(),
1126 CodeCreateEvent(Logger::STORE_INITIALIZE_TAG, *code, 0));
1127 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code));
1128 return code;
1129 }
1130
1131
1132 Handle<Code> StubCompiler::CompileStorePreMonomorphic(Code::Flags flags) {
1133 StoreIC::GeneratePreMonomorphic(masm());
1134 Handle<Code> code = GetCodeWithFlags(flags, "CompileStorePreMonomorphic");
1135 PROFILE(isolate(),
1136 CodeCreateEvent(Logger::STORE_PREMONOMORPHIC_TAG, *code, 0));
1137 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code));
1138 return code;
1139 }
1140
1141
1142 Handle<Code> StubCompiler::CompileStoreGeneric(Code::Flags flags) {
1143 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
1144 StrictModeFlag strict_mode = StoreIC::GetStrictMode(extra_state);
1145 StoreIC::GenerateRuntimeSetProperty(masm(), strict_mode);
1146 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreGeneric");
1147 PROFILE(isolate(),
1148 CodeCreateEvent(Logger::STORE_GENERIC_TAG, *code, 0));
1149 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code));
1150 return code;
1151 }
1152
1153
1154 Handle<Code> StubCompiler::CompileStoreMegamorphic(Code::Flags flags) {
1155 ExtraICState extra_state = Code::ExtractExtraICStateFromFlags(flags);
1156 StoreIC::GenerateMegamorphic(masm(), extra_state);
1157 Handle<Code> code = GetCodeWithFlags(flags, "CompileStoreMegamorphic");
1158 PROFILE(isolate(),
1159 CodeCreateEvent(Logger::STORE_MEGAMORPHIC_TAG, *code, 0));
1160 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *code));
1161 return code;
1162 }
1163
1164
1029 Handle<Code> StubCompiler::CompileCallArguments(Code::Flags flags) { 1165 Handle<Code> StubCompiler::CompileCallArguments(Code::Flags flags) {
1030 int argc = Code::ExtractArgumentsCountFromFlags(flags); 1166 int argc = Code::ExtractArgumentsCountFromFlags(flags);
1031 KeyedCallIC::GenerateNonStrictArguments(masm(), argc); 1167 KeyedCallIC::GenerateNonStrictArguments(masm(), argc);
1032 Handle<Code> code = GetCodeWithFlags(flags, "CompileCallArguments"); 1168 Handle<Code> code = GetCodeWithFlags(flags, "CompileCallArguments");
1033 PROFILE(isolate(), 1169 PROFILE(isolate(),
1034 CodeCreateEvent(CALL_LOGGER_TAG(Code::ExtractKindFromFlags(flags), 1170 CodeCreateEvent(CALL_LOGGER_TAG(Code::ExtractKindFromFlags(flags),
1035 CALL_MEGAMORPHIC_TAG), 1171 CALL_MEGAMORPHIC_TAG),
1036 *code, code->arguments_count())); 1172 *code, code->arguments_count()));
1037 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, *code)); 1173 GDBJIT(AddCode(GDBJITInterface::CALL_MEGAMORPHIC, *code));
1038 return code; 1174 return code;
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 Handle<FunctionTemplateInfo>( 2033 Handle<FunctionTemplateInfo>(
1898 FunctionTemplateInfo::cast(signature->receiver())); 2034 FunctionTemplateInfo::cast(signature->receiver()));
1899 } 2035 }
1900 } 2036 }
1901 2037
1902 is_simple_api_call_ = true; 2038 is_simple_api_call_ = true;
1903 } 2039 }
1904 2040
1905 2041
1906 } } // namespace v8::internal 2042 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698