1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission.
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 #include "bootstrapper.h"
31 #include "code-stubs.h"
32 #include "cpu-profiler.h"
33 #include "stub-cache.h"
36 #include "macro-assembler.h"
42 CodeStubInterfaceDescriptor::CodeStubInterfaceDescriptor()
43 : register_param_count_(-1),
44 stack_parameter_count_(no_reg),
45 hint_stack_parameter_count_(-1),
46 continuation_type_(NORMAL_CONTINUATION),
47 function_mode_(NOT_JS_FUNCTION_STUB_MODE),
48 register_params_(NULL),
49 deoptimization_handler_(NULL),
50 handler_arguments_mode_(DONT_PASS_ARGUMENTS),
52 has_miss_handler_(false) { }
55 void CodeStub::GenerateStubsRequiringBuiltinsAheadOfTime(Isolate* isolate) {
56 StubFailureTailCallTrampolineStub::GenerateAheadOfTime(isolate);
60 bool CodeStub::FindCodeInCache(Code** code_out, Isolate* isolate) {
61 UnseededNumberDictionary* stubs = isolate->heap()->code_stubs();
62 int index = stubs->FindEntry(GetKey());
63 if (index != UnseededNumberDictionary::kNotFound) {
64 *code_out = Code::cast(stubs->ValueAt(index));
71 SmartArrayPointer<const char> CodeStub::GetName() {
73 NoAllocationStringAllocator allocator(buffer,
74 static_cast<unsigned>(sizeof(buffer)));
75 StringStream stream(&allocator);
77 return stream.ToCString();
81 void CodeStub::RecordCodeGeneration(Code* code, Isolate* isolate) {
82 SmartArrayPointer<const char> name = GetName();
83 PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, name.get()));
84 GDBJIT(AddCode(GDBJITInterface::STUB, name.get(), code));
85 Counters* counters = isolate->counters();
86 counters->total_stubs_code_size()->Increment(code->instruction_size());
90 Code::Kind CodeStub::GetCodeKind() const {
95 Handle<Code> CodeStub::GetCodeCopyFromTemplate(Isolate* isolate) {
96 Handle<Code> ic = GetCode(isolate);
97 ic = isolate->factory()->CopyCode(ic);
98 RecordCodeGeneration(*ic, isolate);
103 Handle<Code> PlatformCodeStub::GenerateCode(Isolate* isolate) {
104 Factory* factory = isolate->factory();
106 // Generate the new code.
107 MacroAssembler masm(isolate, NULL, 256);
110 // Update the static counter each time a new code stub is generated.
111 isolate->counters()->code_stubs()->Increment();
113 // Generate the code for the stub.
114 masm.set_generating_stub(true);
115 NoCurrentFrameScope scope(&masm);
119 // Create the code object.
123 // Copy the generated code into a heap object.
124 Code::Flags flags = Code::ComputeFlags(
130 Handle<Code> new_object = factory->NewCode(
131 desc, flags, masm.CodeObject(), NeedsImmovableCode());
136 void CodeStub::VerifyPlatformFeatures(Isolate* isolate) {
137 ASSERT(CpuFeatures::VerifyCrossCompiling());
141 Handle<Code> CodeStub::GetCode(Isolate* isolate) {
142 Factory* factory = isolate->factory();
143 Heap* heap = isolate->heap();
145 if (UseSpecialCache()
146 ? FindCodeInSpecialCache(&code, isolate)
147 : FindCodeInCache(&code, isolate)) {
148 ASSERT(GetCodeKind() == code->kind());
149 return Handle<Code>(code);
153 VerifyPlatformFeatures(isolate);
157 HandleScope scope(isolate);
159 Handle<Code> new_object = GenerateCode(isolate);
160 new_object->set_major_key(MajorKey());
161 FinishCode(new_object);
162 RecordCodeGeneration(*new_object, isolate);
164 #ifdef ENABLE_DISASSEMBLER
165 if (FLAG_print_code_stubs) {
166 CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
167 new_object->Disassemble(GetName().get(), trace_scope.file());
168 PrintF(trace_scope.file(), "\n");
172 if (UseSpecialCache()) {
173 AddToSpecialCache(new_object);
175 // Update the dictionary and the root in Heap.
176 Handle<UnseededNumberDictionary> dict =
177 factory->DictionaryAtNumberPut(
178 Handle<UnseededNumberDictionary>(heap->code_stubs()),
181 heap->public_set_code_stubs(*dict);
187 ASSERT(!NeedsImmovableCode() ||
188 heap->lo_space()->Contains(code) ||
189 heap->code_space()->FirstPage()->Contains(code->address()));
190 return Handle<Code>(code, isolate);
194 const char* CodeStub::MajorName(CodeStub::Major major_key,
195 bool allow_unknown_keys) {
197 #define DEF_CASE(name) case name: return #name "Stub";
198 CODE_STUB_LIST(DEF_CASE)
200 case UninitializedMajorKey: return "<UninitializedMajorKey>Stub";
202 if (!allow_unknown_keys) {
210 void CodeStub::PrintBaseName(StringStream* stream) {
211 stream->Add("%s", MajorName(MajorKey(), false));
215 void CodeStub::PrintName(StringStream* stream) {
216 PrintBaseName(stream);
222 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate) {
223 // Generate the uninitialized versions of the stub.
224 for (int op = Token::BIT_OR; op <= Token::MOD; ++op) {
225 for (int mode = NO_OVERWRITE; mode <= OVERWRITE_RIGHT; ++mode) {
226 BinaryOpICStub stub(static_cast<Token::Value>(op),
227 static_cast<OverwriteMode>(mode));
228 stub.GetCode(isolate);
232 // Generate special versions of the stub.
233 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime);
237 void BinaryOpICStub::PrintState(StringStream* stream) {
238 state_.Print(stream);
243 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate,
244 const BinaryOpIC::State& state) {
245 BinaryOpICStub stub(state);
246 stub.GetCode(isolate);
251 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
252 // Generate special versions of the stub.
253 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime);
257 void BinaryOpICWithAllocationSiteStub::PrintState(StringStream* stream) {
258 state_.Print(stream);
263 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(
264 Isolate* isolate, const BinaryOpIC::State& state) {
265 if (state.CouldCreateAllocationMementos()) {
266 BinaryOpICWithAllocationSiteStub stub(state);
267 stub.GetCode(isolate);
272 void StringAddStub::PrintBaseName(StringStream* stream) {
273 stream->Add("StringAddStub");
274 if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) {
275 stream->Add("_CheckBoth");
276 } else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) {
277 stream->Add("_CheckLeft");
278 } else if ((flags() & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) {
279 stream->Add("_CheckRight");
281 if (pretenure_flag() == TENURED) {
282 stream->Add("_Tenured");
287 InlineCacheState ICCompareStub::GetICState() {
288 CompareIC::State state = Max(left_, right_);
290 case CompareIC::UNINITIALIZED:
291 return ::v8::internal::UNINITIALIZED;
293 case CompareIC::NUMBER:
294 case CompareIC::INTERNALIZED_STRING:
295 case CompareIC::STRING:
296 case CompareIC::UNIQUE_NAME:
297 case CompareIC::OBJECT:
298 case CompareIC::KNOWN_OBJECT:
300 case CompareIC::GENERIC:
301 return ::v8::internal::GENERIC;
304 return ::v8::internal::UNINITIALIZED;
308 void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) {
309 ASSERT(*known_map_ != NULL);
310 Isolate* isolate = new_object->GetIsolate();
311 Factory* factory = isolate->factory();
312 return Map::UpdateCodeCache(known_map_,
314 factory->strict_compare_ic_string() :
315 factory->compare_ic_string(),
320 bool ICCompareStub::FindCodeInSpecialCache(Code** code_out, Isolate* isolate) {
321 Factory* factory = isolate->factory();
322 Code::Flags flags = Code::ComputeFlags(
325 ASSERT(op_ == Token::EQ || op_ == Token::EQ_STRICT);
326 Handle<Object> probe(
327 known_map_->FindInCodeCache(
329 *factory->strict_compare_ic_string() :
330 *factory->compare_ic_string(),
333 if (probe->IsCode()) {
334 *code_out = Code::cast(*probe);
336 Token::Value cached_op;
337 ICCompareStub::DecodeMinorKey((*code_out)->stub_info(), NULL, NULL, NULL,
339 ASSERT(op_ == cached_op);
347 int ICCompareStub::MinorKey() {
348 return OpField::encode(op_ - Token::EQ) |
349 LeftStateField::encode(left_) |
350 RightStateField::encode(right_) |
351 HandlerStateField::encode(state_);
355 void ICCompareStub::DecodeMinorKey(int minor_key,
356 CompareIC::State* left_state,
357 CompareIC::State* right_state,
358 CompareIC::State* handler_state,
362 static_cast<CompareIC::State>(LeftStateField::decode(minor_key));
366 static_cast<CompareIC::State>(RightStateField::decode(minor_key));
370 static_cast<CompareIC::State>(HandlerStateField::decode(minor_key));
373 *op = static_cast<Token::Value>(OpField::decode(minor_key) + Token::EQ);
378 void ICCompareStub::Generate(MacroAssembler* masm) {
380 case CompareIC::UNINITIALIZED:
386 case CompareIC::NUMBER:
387 GenerateNumbers(masm);
389 case CompareIC::STRING:
390 GenerateStrings(masm);
392 case CompareIC::INTERNALIZED_STRING:
393 GenerateInternalizedStrings(masm);
395 case CompareIC::UNIQUE_NAME:
396 GenerateUniqueNames(masm);
398 case CompareIC::OBJECT:
399 GenerateObjects(masm);
401 case CompareIC::KNOWN_OBJECT:
402 ASSERT(*known_map_ != NULL);
403 GenerateKnownObjects(masm);
405 case CompareIC::GENERIC:
406 GenerateGeneric(masm);
412 void CompareNilICStub::UpdateStatus(Handle<Object> object) {
413 ASSERT(!state_.Contains(GENERIC));
414 State old_state(state_);
415 if (object->IsNull()) {
416 state_.Add(NULL_TYPE);
417 } else if (object->IsUndefined()) {
418 state_.Add(UNDEFINED);
419 } else if (object->IsUndetectableObject() ||
420 object->IsOddball() ||
421 !object->IsHeapObject()) {
424 } else if (IsMonomorphic()) {
428 state_.Add(MONOMORPHIC_MAP);
430 TraceTransition(old_state, state_);
434 template<class StateType>
435 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) {
436 // Note: Although a no-op transition is semantically OK, it is hinting at a
437 // bug somewhere in our state transition machinery.
439 if (!FLAG_trace_ic) return;
441 NoAllocationStringAllocator allocator(buffer,
442 static_cast<unsigned>(sizeof(buffer)));
443 StringStream stream(&allocator);
445 PrintBaseName(&stream);
451 stream.OutputToStdOut();
455 void CompareNilICStub::PrintBaseName(StringStream* stream) {
456 CodeStub::PrintBaseName(stream);
457 stream->Add((nil_value_ == kNullValue) ? "(NullValue)":
462 void CompareNilICStub::PrintState(StringStream* stream) {
463 state_.Print(stream);
467 void CompareNilICStub::State::Print(StringStream* stream) const {
469 SimpleListPrinter printer(stream);
470 if (IsEmpty()) printer.Add("None");
471 if (Contains(UNDEFINED)) printer.Add("Undefined");
472 if (Contains(NULL_TYPE)) printer.Add("Null");
473 if (Contains(MONOMORPHIC_MAP)) printer.Add("MonomorphicMap");
474 if (Contains(GENERIC)) printer.Add("Generic");
479 Type* CompareNilICStub::GetType(Zone* zone, Handle<Map> map) {
480 if (state_.Contains(CompareNilICStub::GENERIC)) {
481 return Type::Any(zone);
484 Type* result = Type::None(zone);
485 if (state_.Contains(CompareNilICStub::UNDEFINED)) {
486 result = Type::Union(result, Type::Undefined(zone), zone);
488 if (state_.Contains(CompareNilICStub::NULL_TYPE)) {
489 result = Type::Union(result, Type::Null(zone), zone);
491 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) {
493 map.is_null() ? Type::Detectable(zone) : Type::Class(map, zone);
494 result = Type::Union(result, type, zone);
501 Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) {
502 Type* output_type = GetType(zone, map);
504 nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone);
505 return Type::Union(output_type, nil_type, zone);
509 void InstanceofStub::PrintName(StringStream* stream) {
510 const char* args = "";
511 if (HasArgsInRegisters()) {
515 const char* inline_check = "";
516 if (HasCallSiteInlineCheck()) {
517 inline_check = "_INLINE";
520 const char* return_true_false_object = "";
521 if (ReturnTrueFalseObject()) {
522 return_true_false_object = "_TRUEFALSE";
525 stream->Add("InstanceofStub%s%s%s",
528 return_true_false_object);
532 void JSEntryStub::FinishCode(Handle<Code> code) {
533 Handle<FixedArray> handler_table =
534 code->GetIsolate()->factory()->NewFixedArray(1, TENURED);
535 handler_table->set(0, Smi::FromInt(handler_offset_));
536 code->set_handler_table(*handler_table);
540 void KeyedLoadDictionaryElementPlatformStub::Generate(
541 MacroAssembler* masm) {
542 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
546 void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
547 CreateAllocationSiteStub stub;
548 stub.GetCode(isolate);
552 void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
553 switch (elements_kind_) {
555 case FAST_HOLEY_ELEMENTS:
556 case FAST_SMI_ELEMENTS:
557 case FAST_HOLEY_SMI_ELEMENTS:
558 case FAST_DOUBLE_ELEMENTS:
559 case FAST_HOLEY_DOUBLE_ELEMENTS:
560 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
561 case EXTERNAL_##TYPE##_ELEMENTS: \
562 case TYPE##_ELEMENTS:
564 TYPED_ARRAYS(TYPED_ARRAY_CASE)
565 #undef TYPED_ARRAY_CASE
568 case DICTIONARY_ELEMENTS:
569 KeyedStoreStubCompiler::GenerateStoreDictionaryElement(masm);
571 case NON_STRICT_ARGUMENTS_ELEMENTS:
578 void ArgumentsAccessStub::PrintName(StringStream* stream) {
579 stream->Add("ArgumentsAccessStub_");
581 case READ_ELEMENT: stream->Add("ReadElement"); break;
582 case NEW_NON_STRICT_FAST: stream->Add("NewNonStrictFast"); break;
583 case NEW_NON_STRICT_SLOW: stream->Add("NewNonStrictSlow"); break;
584 case NEW_STRICT: stream->Add("NewStrict"); break;
589 void CallFunctionStub::PrintName(StringStream* stream) {
590 stream->Add("CallFunctionStub_Args%d", argc_);
591 if (RecordCallTarget()) stream->Add("_Recording");
595 void CallConstructStub::PrintName(StringStream* stream) {
596 stream->Add("CallConstructStub");
597 if (RecordCallTarget()) stream->Add("_Recording");
601 void ArrayConstructorStub::PrintName(StringStream* stream) {
602 stream->Add("ArrayConstructorStub");
603 switch (argument_count_) {
604 case ANY: stream->Add("_Any"); break;
605 case NONE: stream->Add("_None"); break;
606 case ONE: stream->Add("_One"); break;
607 case MORE_THAN_ONE: stream->Add("_More_Than_One"); break;
612 void ArrayConstructorStubBase::BasePrintName(const char* name,
613 StringStream* stream) {
616 stream->Add(ElementsKindToString(elements_kind()));
617 if (override_mode() == DISABLE_ALLOCATION_SITES) {
618 stream->Add("_DISABLE_ALLOCATION_SITES");
623 bool ToBooleanStub::UpdateStatus(Handle<Object> object) {
624 Types old_types(types_);
625 bool to_boolean_value = types_.UpdateStatus(object);
626 TraceTransition(old_types, types_);
627 return to_boolean_value;
631 void ToBooleanStub::PrintState(StringStream* stream) {
632 types_.Print(stream);
636 void ToBooleanStub::Types::Print(StringStream* stream) const {
638 SimpleListPrinter printer(stream);
639 if (IsEmpty()) printer.Add("None");
640 if (Contains(UNDEFINED)) printer.Add("Undefined");
641 if (Contains(BOOLEAN)) printer.Add("Bool");
642 if (Contains(NULL_TYPE)) printer.Add("Null");
643 if (Contains(SMI)) printer.Add("Smi");
644 if (Contains(SPEC_OBJECT)) printer.Add("SpecObject");
645 if (Contains(STRING)) printer.Add("String");
646 if (Contains(SYMBOL)) printer.Add("Symbol");
647 if (Contains(HEAP_NUMBER)) printer.Add("HeapNumber");
652 bool ToBooleanStub::Types::UpdateStatus(Handle<Object> object) {
653 if (object->IsUndefined()) {
656 } else if (object->IsBoolean()) {
658 return object->IsTrue();
659 } else if (object->IsNull()) {
662 } else if (object->IsSmi()) {
664 return Smi::cast(*object)->value() != 0;
665 } else if (object->IsSpecObject()) {
667 return !object->IsUndetectableObject();
668 } else if (object->IsString()) {
670 return !object->IsUndetectableObject() &&
671 String::cast(*object)->length() != 0;
672 } else if (object->IsSymbol()) {
675 } else if (object->IsHeapNumber()) {
676 ASSERT(!object->IsUndetectableObject());
678 double value = HeapNumber::cast(*object)->value();
679 return value != 0 && !std::isnan(value);
681 // We should never see an internal object at runtime here!
688 bool ToBooleanStub::Types::NeedsMap() const {
689 return Contains(ToBooleanStub::SPEC_OBJECT)
690 || Contains(ToBooleanStub::STRING)
691 || Contains(ToBooleanStub::SYMBOL)
692 || Contains(ToBooleanStub::HEAP_NUMBER);
696 bool ToBooleanStub::Types::CanBeUndetectable() const {
697 return Contains(ToBooleanStub::SPEC_OBJECT)
698 || Contains(ToBooleanStub::STRING);
702 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
703 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE);
704 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE);
705 stub1.GetCode(isolate);
706 stub2.GetCode(isolate);
710 void StubFailureTailCallTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
711 StubFailureTailCallTrampolineStub stub;
712 stub.GetCode(isolate);
716 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function,
717 intptr_t stack_pointer,
719 FunctionEntryHook entry_hook = isolate->function_entry_hook();
720 ASSERT(entry_hook != NULL);
721 entry_hook(function, stack_pointer);
725 static void InstallDescriptor(Isolate* isolate, HydrogenCodeStub* stub) {
726 int major_key = stub->MajorKey();
727 CodeStubInterfaceDescriptor* descriptor =
728 isolate->code_stub_interface_descriptor(major_key);
729 if (!descriptor->initialized()) {
730 stub->InitializeInterfaceDescriptor(isolate, descriptor);
735 void ArrayConstructorStubBase::InstallDescriptors(Isolate* isolate) {
736 ArrayNoArgumentConstructorStub stub1(GetInitialFastElementsKind());
737 InstallDescriptor(isolate, &stub1);
738 ArraySingleArgumentConstructorStub stub2(GetInitialFastElementsKind());
739 InstallDescriptor(isolate, &stub2);
740 ArrayNArgumentsConstructorStub stub3(GetInitialFastElementsKind());
741 InstallDescriptor(isolate, &stub3);
745 void NumberToStringStub::InstallDescriptors(Isolate* isolate) {
746 NumberToStringStub stub;
747 InstallDescriptor(isolate, &stub);
751 void FastNewClosureStub::InstallDescriptors(Isolate* isolate) {
752 FastNewClosureStub stub(STRICT_MODE, false);
753 InstallDescriptor(isolate, &stub);
757 void FastNewContextStub::InstallDescriptors(Isolate* isolate) {
758 FastNewContextStub stub(FastNewContextStub::kMaximumSlots);
759 InstallDescriptor(isolate, &stub);
764 void BinaryOpICStub::InstallDescriptors(Isolate* isolate) {
765 BinaryOpICStub stub(Token::ADD, NO_OVERWRITE);
766 InstallDescriptor(isolate, &stub);
771 void BinaryOpWithAllocationSiteStub::InstallDescriptors(Isolate* isolate) {
772 BinaryOpWithAllocationSiteStub stub(Token::ADD, NO_OVERWRITE);
773 InstallDescriptor(isolate, &stub);
778 void StringAddStub::InstallDescriptors(Isolate* isolate) {
779 StringAddStub stub(STRING_ADD_CHECK_NONE, NOT_TENURED);
780 InstallDescriptor(isolate, &stub);
784 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
785 : argument_count_(ANY) {
786 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
790 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate,
791 int argument_count) {
792 if (argument_count == 0) {
793 argument_count_ = NONE;
794 } else if (argument_count == 1) {
795 argument_count_ = ONE;
796 } else if (argument_count >= 2) {
797 argument_count_ = MORE_THAN_ONE;
801 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
805 void InternalArrayConstructorStubBase::InstallDescriptors(Isolate* isolate) {
806 InternalArrayNoArgumentConstructorStub stub1(FAST_ELEMENTS);
807 InstallDescriptor(isolate, &stub1);
808 InternalArraySingleArgumentConstructorStub stub2(FAST_ELEMENTS);
809 InstallDescriptor(isolate, &stub2);
810 InternalArrayNArgumentsConstructorStub stub3(FAST_ELEMENTS);
811 InstallDescriptor(isolate, &stub3);
814 InternalArrayConstructorStub::InternalArrayConstructorStub(
816 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
820 } } // namespace v8::internal