| Index: src/compiler/node-properties.cc
|
| diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc
|
| index afed6347e5b87c576d215dd4dc696eeb641ceae3..646dbc209e4524a2a6fe61c769541181648f8488 100644
|
| --- a/src/compiler/node-properties.cc
|
| +++ b/src/compiler/node-properties.cc
|
| @@ -338,76 +338,6 @@ MaybeHandle<Context> NodeProperties::GetSpecializationContext(
|
|
|
|
|
| // static
|
| -MaybeHandle<Context> NodeProperties::GetSpecializationNativeContext(
|
| - Node* node, MaybeHandle<Context> native_context) {
|
| - while (true) {
|
| - switch (node->opcode()) {
|
| - case IrOpcode::kJSLoadContext: {
|
| - ContextAccess const& access = ContextAccessOf(node->op());
|
| - if (access.index() != Context::NATIVE_CONTEXT_INDEX) {
|
| - return MaybeHandle<Context>();
|
| - }
|
| - // Skip over the intermediate contexts, we're only interested in the
|
| - // very last context in the context chain anyway.
|
| - node = NodeProperties::GetContextInput(node);
|
| - break;
|
| - }
|
| - case IrOpcode::kJSCreateBlockContext:
|
| - case IrOpcode::kJSCreateCatchContext:
|
| - case IrOpcode::kJSCreateFunctionContext:
|
| - case IrOpcode::kJSCreateScriptContext:
|
| - case IrOpcode::kJSCreateWithContext: {
|
| - // Skip over the intermediate contexts, we're only interested in the
|
| - // very last context in the context chain anyway.
|
| - node = NodeProperties::GetContextInput(node);
|
| - break;
|
| - }
|
| - case IrOpcode::kHeapConstant: {
|
| - // Extract the native context from the actual {context}.
|
| - Handle<Context> context =
|
| - Handle<Context>::cast(OpParameter<Handle<HeapObject>>(node));
|
| - return handle(context->native_context());
|
| - }
|
| - case IrOpcode::kOsrGuard: {
|
| - Node* osr_value = node->InputAt(0);
|
| - DCHECK_EQ(IrOpcode::kOsrValue, osr_value->opcode());
|
| - int const index = OsrValueIndexOf(osr_value->op());
|
| - if (index == Linkage::kOsrContextSpillSlotIndex) {
|
| - return native_context;
|
| - }
|
| - return MaybeHandle<Context>();
|
| - }
|
| - case IrOpcode::kParameter: {
|
| - Node* const start = NodeProperties::GetValueInput(node, 0);
|
| - DCHECK_EQ(IrOpcode::kStart, start->opcode());
|
| - int const index = ParameterIndexOf(node->op());
|
| - // The context is always the last parameter to a JavaScript function,
|
| - // and {Parameter} indices start at -1, so value outputs of {Start}
|
| - // look like this: closure, receiver, param0, ..., paramN, context.
|
| - if (index == start->op()->ValueOutputCount() - 2) {
|
| - return native_context;
|
| - }
|
| - return MaybeHandle<Context>();
|
| - }
|
| - default:
|
| - return MaybeHandle<Context>();
|
| - }
|
| - }
|
| -}
|
| -
|
| -
|
| -// static
|
| -MaybeHandle<JSGlobalObject> NodeProperties::GetSpecializationGlobalObject(
|
| - Node* node, MaybeHandle<Context> native_context) {
|
| - Handle<Context> context;
|
| - if (GetSpecializationNativeContext(node, native_context).ToHandle(&context)) {
|
| - return handle(context->global_object());
|
| - }
|
| - return MaybeHandle<JSGlobalObject>();
|
| -}
|
| -
|
| -
|
| -// static
|
| Type* NodeProperties::GetTypeOrAny(Node* node) {
|
| return IsTyped(node) ? node->type() : Type::Any();
|
| }
|
|
|