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 function_mode_(NOT_JS_FUNCTION_STUB_MODE),
47 register_params_(NULL),
48 deoptimization_handler_(NULL),
49 handler_arguments_mode_(DONT_PASS_ARGUMENTS),
51 has_miss_handler_(false) { }
54 bool CodeStub::FindCodeInCache(Code** code_out, Isolate* isolate) {
55 UnseededNumberDictionary* stubs = isolate->heap()->code_stubs();
56 int index = stubs->FindEntry(GetKey());
57 if (index != UnseededNumberDictionary::kNotFound) {
58 *code_out = Code::cast(stubs->ValueAt(index));
65 SmartArrayPointer<const char> CodeStub::GetName() {
67 NoAllocationStringAllocator allocator(buffer,
68 static_cast<unsigned>(sizeof(buffer)));
69 StringStream stream(&allocator);
71 return stream.ToCString();
75 void CodeStub::RecordCodeGeneration(Code* code, Isolate* isolate) {
76 SmartArrayPointer<const char> name = GetName();
77 PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, name.get()));
78 GDBJIT(AddCode(GDBJITInterface::STUB, name.get(), code));
79 Counters* counters = isolate->counters();
80 counters->total_stubs_code_size()->Increment(code->instruction_size());
84 Code::Kind CodeStub::GetCodeKind() const {
89 Handle<Code> CodeStub::GetCodeCopyFromTemplate(Isolate* isolate) {
90 Handle<Code> ic = GetCode(isolate);
91 ic = isolate->factory()->CopyCode(ic);
92 RecordCodeGeneration(*ic, isolate);
97 Handle<Code> PlatformCodeStub::GenerateCode(Isolate* isolate) {
98 Factory* factory = isolate->factory();
100 // Generate the new code.
101 MacroAssembler masm(isolate, NULL, 256);
104 // Update the static counter each time a new code stub is generated.
105 isolate->counters()->code_stubs()->Increment();
107 // Generate the code for the stub.
108 masm.set_generating_stub(true);
109 NoCurrentFrameScope scope(&masm);
113 // Create the code object.
117 // Copy the generated code into a heap object.
118 Code::Flags flags = Code::ComputeFlags(
124 Handle<Code> new_object = factory->NewCode(
125 desc, flags, masm.CodeObject(), NeedsImmovableCode());
130 void CodeStub::VerifyPlatformFeatures(Isolate* isolate) {
131 ASSERT(CpuFeatures::VerifyCrossCompiling());
135 Handle<Code> CodeStub::GetCode(Isolate* isolate) {
136 Factory* factory = isolate->factory();
137 Heap* heap = isolate->heap();
139 if (UseSpecialCache()
140 ? FindCodeInSpecialCache(&code, isolate)
141 : FindCodeInCache(&code, isolate)) {
142 ASSERT(GetCodeKind() == code->kind());
143 return Handle<Code>(code);
147 VerifyPlatformFeatures(isolate);
151 HandleScope scope(isolate);
153 Handle<Code> new_object = GenerateCode(isolate);
154 new_object->set_major_key(MajorKey());
155 FinishCode(new_object);
156 RecordCodeGeneration(*new_object, isolate);
158 #ifdef ENABLE_DISASSEMBLER
159 if (FLAG_print_code_stubs) {
160 CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
161 new_object->Disassemble(GetName().get(), trace_scope.file());
162 PrintF(trace_scope.file(), "\n");
166 if (UseSpecialCache()) {
167 AddToSpecialCache(new_object);
169 // Update the dictionary and the root in Heap.
170 Handle<UnseededNumberDictionary> dict =
171 factory->DictionaryAtNumberPut(
172 Handle<UnseededNumberDictionary>(heap->code_stubs()),
175 heap->public_set_code_stubs(*dict);
181 ASSERT(!NeedsImmovableCode() ||
182 heap->lo_space()->Contains(code) ||
183 heap->code_space()->FirstPage()->Contains(code->address()));
184 return Handle<Code>(code, isolate);
188 const char* CodeStub::MajorName(CodeStub::Major major_key,
189 bool allow_unknown_keys) {
191 #define DEF_CASE(name) case name: return #name "Stub";
192 CODE_STUB_LIST(DEF_CASE)
194 case UninitializedMajorKey: return "<UninitializedMajorKey>Stub";
196 if (!allow_unknown_keys) {
204 void CodeStub::PrintBaseName(StringStream* stream) {
205 stream->Add("%s", MajorName(MajorKey(), false));
209 void CodeStub::PrintName(StringStream* stream) {
210 PrintBaseName(stream);
216 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate) {
217 // Generate the uninitialized versions of the stub.
218 for (int op = Token::BIT_OR; op <= Token::MOD; ++op) {
219 for (int mode = NO_OVERWRITE; mode <= OVERWRITE_RIGHT; ++mode) {
220 BinaryOpICStub stub(static_cast<Token::Value>(op),
221 static_cast<OverwriteMode>(mode));
222 stub.GetCode(isolate);
226 // Generate special versions of the stub.
227 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime);
231 void BinaryOpICStub::PrintState(StringStream* stream) {
232 state_.Print(stream);
237 void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate,
238 const BinaryOpIC::State& state) {
239 BinaryOpICStub stub(state);
240 stub.GetCode(isolate);
245 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
246 // Generate special versions of the stub.
247 BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime);
251 void BinaryOpICWithAllocationSiteStub::PrintState(StringStream* stream) {
252 state_.Print(stream);
257 void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(
258 Isolate* isolate, const BinaryOpIC::State& state) {
259 if (state.CouldCreateAllocationMementos()) {
260 BinaryOpICWithAllocationSiteStub stub(state);
261 stub.GetCode(isolate);
266 void StringAddStub::PrintBaseName(StringStream* stream) {
267 stream->Add("StringAddStub");
268 if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) {
269 stream->Add("_CheckBoth");
270 } else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) {
271 stream->Add("_CheckLeft");
272 } else if ((flags() & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) {
273 stream->Add("_CheckRight");
275 if (pretenure_flag() == TENURED) {
276 stream->Add("_Tenured");
281 InlineCacheState ICCompareStub::GetICState() {
282 CompareIC::State state = Max(left_, right_);
284 case CompareIC::UNINITIALIZED:
285 return ::v8::internal::UNINITIALIZED;
287 case CompareIC::NUMBER:
288 case CompareIC::INTERNALIZED_STRING:
289 case CompareIC::STRING:
290 case CompareIC::UNIQUE_NAME:
291 case CompareIC::OBJECT:
292 case CompareIC::KNOWN_OBJECT:
294 case CompareIC::GENERIC:
295 return ::v8::internal::GENERIC;
298 return ::v8::internal::UNINITIALIZED;
302 void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) {
303 ASSERT(*known_map_ != NULL);
304 Isolate* isolate = new_object->GetIsolate();
305 Factory* factory = isolate->factory();
306 return Map::UpdateCodeCache(known_map_,
308 factory->strict_compare_ic_string() :
309 factory->compare_ic_string(),
314 bool ICCompareStub::FindCodeInSpecialCache(Code** code_out, Isolate* isolate) {
315 Factory* factory = isolate->factory();
316 Code::Flags flags = Code::ComputeFlags(
319 ASSERT(op_ == Token::EQ || op_ == Token::EQ_STRICT);
320 Handle<Object> probe(
321 known_map_->FindInCodeCache(
323 *factory->strict_compare_ic_string() :
324 *factory->compare_ic_string(),
327 if (probe->IsCode()) {
328 *code_out = Code::cast(*probe);
330 Token::Value cached_op;
331 ICCompareStub::DecodeMinorKey((*code_out)->stub_info(), NULL, NULL, NULL,
333 ASSERT(op_ == cached_op);
341 int ICCompareStub::MinorKey() {
342 return OpField::encode(op_ - Token::EQ) |
343 LeftStateField::encode(left_) |
344 RightStateField::encode(right_) |
345 HandlerStateField::encode(state_);
349 void ICCompareStub::DecodeMinorKey(int minor_key,
350 CompareIC::State* left_state,
351 CompareIC::State* right_state,
352 CompareIC::State* handler_state,
356 static_cast<CompareIC::State>(LeftStateField::decode(minor_key));
360 static_cast<CompareIC::State>(RightStateField::decode(minor_key));
364 static_cast<CompareIC::State>(HandlerStateField::decode(minor_key));
367 *op = static_cast<Token::Value>(OpField::decode(minor_key) + Token::EQ);
372 void ICCompareStub::Generate(MacroAssembler* masm) {
374 case CompareIC::UNINITIALIZED:
380 case CompareIC::NUMBER:
381 GenerateNumbers(masm);
383 case CompareIC::STRING:
384 GenerateStrings(masm);
386 case CompareIC::INTERNALIZED_STRING:
387 GenerateInternalizedStrings(masm);
389 case CompareIC::UNIQUE_NAME:
390 GenerateUniqueNames(masm);
392 case CompareIC::OBJECT:
393 GenerateObjects(masm);
395 case CompareIC::KNOWN_OBJECT:
396 ASSERT(*known_map_ != NULL);
397 GenerateKnownObjects(masm);
399 case CompareIC::GENERIC:
400 GenerateGeneric(masm);
406 void CompareNilICStub::UpdateStatus(Handle<Object> object) {
407 ASSERT(!state_.Contains(GENERIC));
408 State old_state(state_);
409 if (object->IsNull()) {
410 state_.Add(NULL_TYPE);
411 } else if (object->IsUndefined()) {
412 state_.Add(UNDEFINED);
413 } else if (object->IsUndetectableObject() ||
414 object->IsOddball() ||
415 !object->IsHeapObject()) {
418 } else if (IsMonomorphic()) {
422 state_.Add(MONOMORPHIC_MAP);
424 TraceTransition(old_state, state_);
428 template<class StateType>
429 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) {
430 // Note: Although a no-op transition is semantically OK, it is hinting at a
431 // bug somewhere in our state transition machinery.
433 if (!FLAG_trace_ic) return;
435 NoAllocationStringAllocator allocator(buffer,
436 static_cast<unsigned>(sizeof(buffer)));
437 StringStream stream(&allocator);
439 PrintBaseName(&stream);
445 stream.OutputToStdOut();
449 void CompareNilICStub::PrintBaseName(StringStream* stream) {
450 CodeStub::PrintBaseName(stream);
451 stream->Add((nil_value_ == kNullValue) ? "(NullValue)":
456 void CompareNilICStub::PrintState(StringStream* stream) {
457 state_.Print(stream);
461 void CompareNilICStub::State::Print(StringStream* stream) const {
463 SimpleListPrinter printer(stream);
464 if (IsEmpty()) printer.Add("None");
465 if (Contains(UNDEFINED)) printer.Add("Undefined");
466 if (Contains(NULL_TYPE)) printer.Add("Null");
467 if (Contains(MONOMORPHIC_MAP)) printer.Add("MonomorphicMap");
468 if (Contains(GENERIC)) printer.Add("Generic");
473 Type* CompareNilICStub::GetType(Zone* zone, Handle<Map> map) {
474 if (state_.Contains(CompareNilICStub::GENERIC)) {
475 return Type::Any(zone);
478 Type* result = Type::None(zone);
479 if (state_.Contains(CompareNilICStub::UNDEFINED)) {
480 result = Type::Union(result, Type::Undefined(zone), zone);
482 if (state_.Contains(CompareNilICStub::NULL_TYPE)) {
483 result = Type::Union(result, Type::Null(zone), zone);
485 if (state_.Contains(CompareNilICStub::MONOMORPHIC_MAP)) {
487 map.is_null() ? Type::Detectable(zone) : Type::Class(map, zone);
488 result = Type::Union(result, type, zone);
495 Type* CompareNilICStub::GetInputType(Zone* zone, Handle<Map> map) {
496 Type* output_type = GetType(zone, map);
498 nil_value_ == kNullValue ? Type::Null(zone) : Type::Undefined(zone);
499 return Type::Union(output_type, nil_type, zone);
503 void InstanceofStub::PrintName(StringStream* stream) {
504 const char* args = "";
505 if (HasArgsInRegisters()) {
509 const char* inline_check = "";
510 if (HasCallSiteInlineCheck()) {
511 inline_check = "_INLINE";
514 const char* return_true_false_object = "";
515 if (ReturnTrueFalseObject()) {
516 return_true_false_object = "_TRUEFALSE";
519 stream->Add("InstanceofStub%s%s%s",
522 return_true_false_object);
526 void JSEntryStub::FinishCode(Handle<Code> code) {
527 Handle<FixedArray> handler_table =
528 code->GetIsolate()->factory()->NewFixedArray(1, TENURED);
529 handler_table->set(0, Smi::FromInt(handler_offset_));
530 code->set_handler_table(*handler_table);
534 void KeyedLoadDictionaryElementPlatformStub::Generate(
535 MacroAssembler* masm) {
536 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm);
540 void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
541 CreateAllocationSiteStub stub;
542 stub.GetCode(isolate);
546 void KeyedStoreElementStub::Generate(MacroAssembler* masm) {
547 switch (elements_kind_) {
549 case FAST_HOLEY_ELEMENTS:
550 case FAST_SMI_ELEMENTS:
551 case FAST_HOLEY_SMI_ELEMENTS:
552 case FAST_DOUBLE_ELEMENTS:
553 case FAST_HOLEY_DOUBLE_ELEMENTS:
554 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
555 case EXTERNAL_##TYPE##_ELEMENTS: \
556 case TYPE##_ELEMENTS:
558 TYPED_ARRAYS(TYPED_ARRAY_CASE)
559 #undef TYPED_ARRAY_CASE
562 case DICTIONARY_ELEMENTS:
563 KeyedStoreStubCompiler::GenerateStoreDictionaryElement(masm);
565 case NON_STRICT_ARGUMENTS_ELEMENTS:
572 void ArgumentsAccessStub::PrintName(StringStream* stream) {
573 stream->Add("ArgumentsAccessStub_");
575 case READ_ELEMENT: stream->Add("ReadElement"); break;
576 case NEW_NON_STRICT_FAST: stream->Add("NewNonStrictFast"); break;
577 case NEW_NON_STRICT_SLOW: stream->Add("NewNonStrictSlow"); break;
578 case NEW_STRICT: stream->Add("NewStrict"); break;
583 void CallFunctionStub::PrintName(StringStream* stream) {
584 stream->Add("CallFunctionStub_Args%d", argc_);
585 if (RecordCallTarget()) stream->Add("_Recording");
589 void CallConstructStub::PrintName(StringStream* stream) {
590 stream->Add("CallConstructStub");
591 if (RecordCallTarget()) stream->Add("_Recording");
595 void ArrayConstructorStub::PrintName(StringStream* stream) {
596 stream->Add("ArrayConstructorStub");
597 switch (argument_count_) {
598 case ANY: stream->Add("_Any"); break;
599 case NONE: stream->Add("_None"); break;
600 case ONE: stream->Add("_One"); break;
601 case MORE_THAN_ONE: stream->Add("_More_Than_One"); break;
606 void ArrayConstructorStubBase::BasePrintName(const char* name,
607 StringStream* stream) {
610 stream->Add(ElementsKindToString(elements_kind()));
611 if (override_mode() == DISABLE_ALLOCATION_SITES) {
612 stream->Add("_DISABLE_ALLOCATION_SITES");
617 bool ToBooleanStub::UpdateStatus(Handle<Object> object) {
618 Types old_types(types_);
619 bool to_boolean_value = types_.UpdateStatus(object);
620 TraceTransition(old_types, types_);
621 return to_boolean_value;
625 void ToBooleanStub::PrintState(StringStream* stream) {
626 types_.Print(stream);
630 void ToBooleanStub::Types::Print(StringStream* stream) const {
632 SimpleListPrinter printer(stream);
633 if (IsEmpty()) printer.Add("None");
634 if (Contains(UNDEFINED)) printer.Add("Undefined");
635 if (Contains(BOOLEAN)) printer.Add("Bool");
636 if (Contains(NULL_TYPE)) printer.Add("Null");
637 if (Contains(SMI)) printer.Add("Smi");
638 if (Contains(SPEC_OBJECT)) printer.Add("SpecObject");
639 if (Contains(STRING)) printer.Add("String");
640 if (Contains(SYMBOL)) printer.Add("Symbol");
641 if (Contains(HEAP_NUMBER)) printer.Add("HeapNumber");
646 bool ToBooleanStub::Types::UpdateStatus(Handle<Object> object) {
647 if (object->IsUndefined()) {
650 } else if (object->IsBoolean()) {
652 return object->IsTrue();
653 } else if (object->IsNull()) {
656 } else if (object->IsSmi()) {
658 return Smi::cast(*object)->value() != 0;
659 } else if (object->IsSpecObject()) {
661 return !object->IsUndetectableObject();
662 } else if (object->IsString()) {
664 return !object->IsUndetectableObject() &&
665 String::cast(*object)->length() != 0;
666 } else if (object->IsSymbol()) {
669 } else if (object->IsHeapNumber()) {
670 ASSERT(!object->IsUndetectableObject());
672 double value = HeapNumber::cast(*object)->value();
673 return value != 0 && !std::isnan(value);
675 // We should never see an internal object at runtime here!
682 bool ToBooleanStub::Types::NeedsMap() const {
683 return Contains(ToBooleanStub::SPEC_OBJECT)
684 || Contains(ToBooleanStub::STRING)
685 || Contains(ToBooleanStub::SYMBOL)
686 || Contains(ToBooleanStub::HEAP_NUMBER);
690 bool ToBooleanStub::Types::CanBeUndetectable() const {
691 return Contains(ToBooleanStub::SPEC_OBJECT)
692 || Contains(ToBooleanStub::STRING);
696 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
697 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE);
698 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE);
699 stub1.GetCode(isolate);
700 stub2.GetCode(isolate);
704 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function,
705 intptr_t stack_pointer,
707 FunctionEntryHook entry_hook = isolate->function_entry_hook();
708 ASSERT(entry_hook != NULL);
709 entry_hook(function, stack_pointer);
713 static void InstallDescriptor(Isolate* isolate, HydrogenCodeStub* stub) {
714 int major_key = stub->MajorKey();
715 CodeStubInterfaceDescriptor* descriptor =
716 isolate->code_stub_interface_descriptor(major_key);
717 if (!descriptor->initialized()) {
718 stub->InitializeInterfaceDescriptor(isolate, descriptor);
723 void ArrayConstructorStubBase::InstallDescriptors(Isolate* isolate) {
724 ArrayNoArgumentConstructorStub stub1(GetInitialFastElementsKind());
725 InstallDescriptor(isolate, &stub1);
726 ArraySingleArgumentConstructorStub stub2(GetInitialFastElementsKind());
727 InstallDescriptor(isolate, &stub2);
728 ArrayNArgumentsConstructorStub stub3(GetInitialFastElementsKind());
729 InstallDescriptor(isolate, &stub3);
733 void NumberToStringStub::InstallDescriptors(Isolate* isolate) {
734 NumberToStringStub stub;
735 InstallDescriptor(isolate, &stub);
739 void FastNewClosureStub::InstallDescriptors(Isolate* isolate) {
740 FastNewClosureStub stub(STRICT_MODE, false);
741 InstallDescriptor(isolate, &stub);
745 void FastNewContextStub::InstallDescriptors(Isolate* isolate) {
746 FastNewContextStub stub(FastNewContextStub::kMaximumSlots);
747 InstallDescriptor(isolate, &stub);
752 void BinaryOpICStub::InstallDescriptors(Isolate* isolate) {
753 BinaryOpICStub stub(Token::ADD, NO_OVERWRITE);
754 InstallDescriptor(isolate, &stub);
759 void BinaryOpWithAllocationSiteStub::InstallDescriptors(Isolate* isolate) {
760 BinaryOpWithAllocationSiteStub stub(Token::ADD, NO_OVERWRITE);
761 InstallDescriptor(isolate, &stub);
766 void StringAddStub::InstallDescriptors(Isolate* isolate) {
767 StringAddStub stub(STRING_ADD_CHECK_NONE, NOT_TENURED);
768 InstallDescriptor(isolate, &stub);
773 void RegExpConstructResultStub::InstallDescriptors(Isolate* isolate) {
774 RegExpConstructResultStub stub;
775 InstallDescriptor(isolate, &stub);
779 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
780 : argument_count_(ANY) {
781 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
785 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate,
786 int argument_count) {
787 if (argument_count == 0) {
788 argument_count_ = NONE;
789 } else if (argument_count == 1) {
790 argument_count_ = ONE;
791 } else if (argument_count >= 2) {
792 argument_count_ = MORE_THAN_ONE;
796 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
800 void InternalArrayConstructorStubBase::InstallDescriptors(Isolate* isolate) {
801 InternalArrayNoArgumentConstructorStub stub1(FAST_ELEMENTS);
802 InstallDescriptor(isolate, &stub1);
803 InternalArraySingleArgumentConstructorStub stub2(FAST_ELEMENTS);
804 InstallDescriptor(isolate, &stub2);
805 InternalArrayNArgumentsConstructorStub stub3(FAST_ELEMENTS);
806 InstallDescriptor(isolate, &stub3);
809 InternalArrayConstructorStub::InternalArrayConstructorStub(
811 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
815 } } // namespace v8::internal