Beispiel #1
0
 public override IEnumerable <FunctionValue> ResolveMethods(TypeValue value, PHP.Core.QualifiedName methodName, IEnumerable <FunctionValue> objectMethods)
 {
     throw new NotImplementedException();
 }
Beispiel #2
0
 public override IEnumerable <FunctionValue> ResolveMethods(Value thisObject, TypeValue type, PHP.Core.QualifiedName methodName, IEnumerable <FunctionValue> objectMethods)
 {
     foreach (var method in objectMethods)
     {
         if (method.Name.Value == methodName.Name.Value)
         {
             yield return(method);
         }
     }
 }
Beispiel #3
0
 /// <inheritdoc />
 protected override IEnumerable <FunctionValue> resolveMethod(SnapshotBase context, PHP.Core.QualifiedName methodName)
 {
     throw new NotImplementedException();
 }
Beispiel #4
0
        /// <summary>
        /// Resolve method on current snapshot entry with given methodName
        /// </summary>
        /// <param name="context">Context where methods are resolved</param>
        /// <param name="methodName">Name of resolved method</param>
        /// <returns>
        /// Resolved methods
        /// </returns>
        protected override IEnumerable <FunctionValue> resolveMethod(SnapshotBase context, PHP.Core.QualifiedName methodName)
        {
            SnapshotLogger.append(context, "resolve method - " + this.ToString() + " method: " + methodName);

            if (isTemporarySet(context))
            {
                return(temporaryLocation.ResolveMethod(context, methodName));
            }
            else
            {
                Snapshot snapshot = SnapshotEntry.ToSnapshot(context);
                return(snapshot.resolveMethod(dataEntry, methodName));
            }
        }
Beispiel #5
0
        /// <summary>
        /// Resolve method on current snapshot entry with given methodName
        /// </summary>
        /// <param name="context">Context where methods are resolved</param>
        /// <param name="methodName">Name of resolved method</param>
        /// <returns>
        /// Resolved methods
        /// </returns>
        protected override IEnumerable <FunctionValue> resolveMethod(SnapshotBase context, PHP.Core.QualifiedName methodName)
        {
            Snapshot snapshot = SnapshotEntry.ToSnapshot(context);

            snapshot.Factories.Logger.Log(context, "resolve method - " + this.ToString() + " method: " + methodName);
            if (isTemporarySet(context))
            {
                return(getTemporary(context).ResolveMethod(context, methodName));
            }
            else
            {
                snapshot.Factories.Logger.Log(snapshot, "iterate fields: " + this.ToString());

                MemoryEntry values = readMemory(snapshot);

                snapshot.Factories.Benchmark.StartOperation(snapshot);

                snapshot.Factories.Benchmark.StartAlgorithm(snapshot, AlgorithmType.RESOLVE_METHOD);
                var methods = snapshot.Algorithms.ReadAlgorithm.GetMethod(snapshot, values, methodName);
                snapshot.Factories.Benchmark.FinishAlgorithm(snapshot, AlgorithmType.RESOLVE_METHOD);

                snapshot.Factories.Benchmark.FinishOperation(snapshot);

                return(methods);
            }
        }