| Index: src/compiler/linkage.cc
|
| diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
|
| index cd597999b013a0e1880f50110120b625b7dccb6e..481b44353b6f97ea191ef2b31dc555897faaa4ae 100644
|
| --- a/src/compiler/linkage.cc
|
| +++ b/src/compiler/linkage.cc
|
| @@ -39,28 +39,30 @@ std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) {
|
| }
|
|
|
|
|
| -Linkage::Linkage(CompilationInfo* info) : info_(info) {
|
| +CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) {
|
| if (info->function() != NULL) {
|
| // If we already have the function literal, use the number of parameters
|
| // plus the receiver.
|
| - incoming_ = GetJSCallDescriptor(1 + info->function()->parameter_count());
|
| - } else if (!info->closure().is_null()) {
|
| + return GetJSCallDescriptor(1 + info->function()->parameter_count(), zone);
|
| + }
|
| + if (!info->closure().is_null()) {
|
| // If we are compiling a JS function, use a JS call descriptor,
|
| // plus the receiver.
|
| SharedFunctionInfo* shared = info->closure()->shared();
|
| - incoming_ = GetJSCallDescriptor(1 + shared->formal_parameter_count());
|
| - } else if (info->code_stub() != NULL) {
|
| + return GetJSCallDescriptor(1 + shared->formal_parameter_count(), zone);
|
| + }
|
| + if (info->code_stub() != NULL) {
|
| // Use the code stub interface descriptor.
|
| CallInterfaceDescriptor descriptor =
|
| info->code_stub()->GetCallInterfaceDescriptor();
|
| - incoming_ = GetStubCallDescriptor(descriptor);
|
| - } else {
|
| - incoming_ = NULL; // TODO(titzer): ?
|
| + return GetStubCallDescriptor(descriptor, 0, CallDescriptor::kNoFlags, zone);
|
| }
|
| + return NULL; // TODO(titzer): ?
|
| }
|
|
|
|
|
| -FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, int extra) {
|
| +FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame,
|
| + int extra) const {
|
| if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() ||
|
| incoming_->kind() == CallDescriptor::kCallAddress) {
|
| int offset;
|
| @@ -87,24 +89,22 @@ FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, int extra) {
|
| }
|
|
|
|
|
| -CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count) {
|
| - return GetJSCallDescriptor(parameter_count, this->info_->zone());
|
| +CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count) const {
|
| + return GetJSCallDescriptor(parameter_count, zone_);
|
| }
|
|
|
|
|
| CallDescriptor* Linkage::GetRuntimeCallDescriptor(
|
| Runtime::FunctionId function, int parameter_count,
|
| - Operator::Properties properties) {
|
| - return GetRuntimeCallDescriptor(function, parameter_count, properties,
|
| - this->info_->zone());
|
| + Operator::Properties properties) const {
|
| + return GetRuntimeCallDescriptor(function, parameter_count, properties, zone_);
|
| }
|
|
|
|
|
| CallDescriptor* Linkage::GetStubCallDescriptor(
|
| CallInterfaceDescriptor descriptor, int stack_parameter_count,
|
| - CallDescriptor::Flags flags) {
|
| - return GetStubCallDescriptor(descriptor, stack_parameter_count, flags,
|
| - this->info_->zone());
|
| + CallDescriptor::Flags flags) const {
|
| + return GetStubCallDescriptor(descriptor, stack_parameter_count, flags, zone_);
|
| }
|
|
|
|
|
| @@ -125,6 +125,7 @@ bool Linkage::NeedsFrameState(Runtime::FunctionId function) {
|
| case Runtime::kCompileLazy:
|
| case Runtime::kCompileOptimized:
|
| case Runtime::kCompileString:
|
| + case Runtime::kCreateObjectLiteral:
|
| case Runtime::kDebugBreak:
|
| case Runtime::kDataViewSetInt8:
|
| case Runtime::kDataViewSetUint8:
|
| @@ -143,23 +144,38 @@ bool Linkage::NeedsFrameState(Runtime::FunctionId function) {
|
| case Runtime::kDataViewGetFloat32:
|
| case Runtime::kDataViewGetFloat64:
|
| case Runtime::kDebugEvaluate:
|
| + case Runtime::kDebugEvaluateGlobal:
|
| case Runtime::kDebugGetLoadedScripts:
|
| case Runtime::kDebugGetPropertyDetails:
|
| case Runtime::kDebugPromiseEvent:
|
| + case Runtime::kDefineAccessorPropertyUnchecked:
|
| + case Runtime::kDefineDataPropertyUnchecked:
|
| case Runtime::kDeleteProperty:
|
| case Runtime::kDeoptimizeFunction:
|
| case Runtime::kFunctionBindArguments:
|
| + case Runtime::kGetDefaultReceiver:
|
| case Runtime::kGetFrameCount:
|
| case Runtime::kGetOwnProperty:
|
| + case Runtime::kGetOwnPropertyNames:
|
| + case Runtime::kGetPropertyNamesFast:
|
| + case Runtime::kGetPrototype:
|
| + case Runtime::kInlineArguments:
|
| case Runtime::kInlineCallFunction:
|
| case Runtime::kInlineDateField:
|
| case Runtime::kInlineRegExpExec:
|
| + case Runtime::kInternalSetPrototype:
|
| + case Runtime::kInterrupt:
|
| + case Runtime::kIsPropertyEnumerable:
|
| + case Runtime::kIsSloppyModeFunction:
|
| case Runtime::kLiveEditGatherCompileInfo:
|
| case Runtime::kLoadLookupSlot:
|
| case Runtime::kLoadLookupSlotNoReferenceError:
|
| case Runtime::kMaterializeRegExpLiteral:
|
| + case Runtime::kNewObject:
|
| case Runtime::kNewObjectFromBound:
|
| + case Runtime::kNewObjectWithAllocationSite:
|
| case Runtime::kObjectFreeze:
|
| + case Runtime::kOwnKeys:
|
| case Runtime::kParseJson:
|
| case Runtime::kPrepareStep:
|
| case Runtime::kPreventExtensions:
|
| @@ -168,16 +184,28 @@ bool Linkage::NeedsFrameState(Runtime::FunctionId function) {
|
| case Runtime::kRegExpCompile:
|
| case Runtime::kRegExpExecMultiple:
|
| case Runtime::kResolvePossiblyDirectEval:
|
| - // case Runtime::kSetPrototype:
|
| + case Runtime::kSetPrototype:
|
| case Runtime::kSetScriptBreakPoint:
|
| + case Runtime::kSparseJoinWithSeparator:
|
| case Runtime::kStackGuard:
|
| + case Runtime::kStoreKeyedToSuper_Sloppy:
|
| + case Runtime::kStoreKeyedToSuper_Strict:
|
| + case Runtime::kStoreToSuper_Sloppy:
|
| + case Runtime::kStoreToSuper_Strict:
|
| case Runtime::kStoreLookupSlot:
|
| case Runtime::kStringBuilderConcat:
|
| + case Runtime::kStringBuilderJoin:
|
| case Runtime::kStringReplaceGlobalRegExpWithString:
|
| + case Runtime::kThrowNonMethodError:
|
| + case Runtime::kThrowNotDateError:
|
| case Runtime::kThrowReferenceError:
|
| + case Runtime::kThrowUnsupportedSuperError:
|
| case Runtime::kThrow:
|
| case Runtime::kTypedArraySetFastCases:
|
| case Runtime::kTypedArrayInitializeFromArrayLike:
|
| +#ifdef V8_I18N_SUPPORT
|
| + case Runtime::kGetImplFromInitializedIntlObject:
|
| +#endif
|
| return true;
|
| default:
|
| return false;
|
|
|