| Index: src/code-stubs.cc
|
| diff --git a/src/code-stubs.cc b/src/code-stubs.cc
|
| index 3fb61534287c1ab7b1075cde2c58844be3e16ae3..e366e88b481f6be5ca022d6719cd72d8845404df 100644
|
| --- a/src/code-stubs.cc
|
| +++ b/src/code-stubs.cc
|
| @@ -80,8 +80,8 @@ SmartArrayPointer<const char> CodeStub::GetName() {
|
|
|
| void CodeStub::RecordCodeGeneration(Code* code, Isolate* isolate) {
|
| SmartArrayPointer<const char> name = GetName();
|
| - PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, *name));
|
| - GDBJIT(AddCode(GDBJITInterface::STUB, *name, code));
|
| + PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, name.get()));
|
| + GDBJIT(AddCode(GDBJITInterface::STUB, name.get(), code));
|
| Counters* counters = isolate->counters();
|
| counters->total_stubs_code_size()->Increment(code->instruction_size());
|
| }
|
| @@ -164,7 +164,7 @@ Handle<Code> CodeStub::GetCode(Isolate* isolate) {
|
| #ifdef ENABLE_DISASSEMBLER
|
| if (FLAG_print_code_stubs) {
|
| CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
|
| - new_object->Disassemble(*GetName(), trace_scope.file());
|
| + new_object->Disassemble(GetName().get(), trace_scope.file());
|
| PrintF(trace_scope.file(), "\n");
|
| }
|
| #endif
|
| @@ -197,6 +197,7 @@ const char* CodeStub::MajorName(CodeStub::Major major_key,
|
| #define DEF_CASE(name) case name: return #name "Stub";
|
| CODE_STUB_LIST(DEF_CASE)
|
| #undef DEF_CASE
|
| + case UninitializedMajorKey: return "<UninitializedMajorKey>Stub";
|
| default:
|
| if (!allow_unknown_keys) {
|
| UNREACHABLE();
|
| @@ -246,6 +247,28 @@ void BinaryOpICStub::GenerateAheadOfTime(Isolate* isolate,
|
| }
|
|
|
|
|
| +// static
|
| +void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
|
| + // Generate special versions of the stub.
|
| + BinaryOpIC::State::GenerateAheadOfTime(isolate, &GenerateAheadOfTime);
|
| +}
|
| +
|
| +
|
| +void BinaryOpICWithAllocationSiteStub::PrintState(StringStream* stream) {
|
| + state_.Print(stream);
|
| +}
|
| +
|
| +
|
| +// static
|
| +void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(
|
| + Isolate* isolate, const BinaryOpIC::State& state) {
|
| + if (state.CouldCreateAllocationMementos()) {
|
| + BinaryOpICWithAllocationSiteStub stub(state);
|
| + stub.GetCode(isolate);
|
| + }
|
| +}
|
| +
|
| +
|
| void NewStringAddStub::PrintBaseName(StringStream* stream) {
|
| stream->Add("NewStringAddStub");
|
| if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) {
|
| @@ -584,6 +607,28 @@ void CallConstructStub::PrintName(StringStream* stream) {
|
| }
|
|
|
|
|
| +void ArrayConstructorStub::PrintName(StringStream* stream) {
|
| + stream->Add("ArrayConstructorStub");
|
| + switch (argument_count_) {
|
| + case ANY: stream->Add("_Any"); break;
|
| + case NONE: stream->Add("_None"); break;
|
| + case ONE: stream->Add("_One"); break;
|
| + case MORE_THAN_ONE: stream->Add("_More_Than_One"); break;
|
| + }
|
| +}
|
| +
|
| +
|
| +void ArrayConstructorStubBase::BasePrintName(const char* name,
|
| + StringStream* stream) {
|
| + stream->Add(name);
|
| + stream->Add("_");
|
| + stream->Add(ElementsKindToString(elements_kind()));
|
| + if (override_mode() == DISABLE_ALLOCATION_SITES) {
|
| + stream->Add("_DISABLE_ALLOCATION_SITES");
|
| + }
|
| +}
|
| +
|
| +
|
| bool ToBooleanStub::UpdateStatus(Handle<Object> object) {
|
| Types old_types(types_);
|
| bool to_boolean_value = types_.UpdateStatus(object);
|
|
|