Home | History | Annotate | Download | only in src

Lines Matching refs:Function

306   // context in which the function was created and we use the object
307 // function from this context to create the object literal. We do
308 // not use the object function from the current global context
309 // because this might be the object function from another context
314 // In case we have function literals, we want the object to be in
392 // containing function literals we defer this operation until after all
394 // constant function properties.
477 // Additionally takes the literals array of the surrounding function
478 // which contains the context from which to get the Array function
1144 // Copy the function and update its context. Use it as value.
1147 Handle<JSFunction> function =
1151 value = function;
1162 // we're either declaring a function or there's an interceptor
1176 // function declarations. To mimic this behavior, we do not allow
1177 // the invocation of setters for function values. This makes a
1179 // handlers such as "function onload() {}". Firefox does call the
1219 // Declarations are always done in the function context.
1231 // the AstBuildingParser::Declare function.
1243 // the function context or the arguments object.
1268 // The property is not in the function context. It needs to be
1269 // "declared" in the function context's extension context, or in the
1273 // The function context's extension context exists - use it.
1276 // The function context's extension context does not exists - allocate
1490 // assigned a function value.
1508 // Initializations are always done in the function context.
1525 // function f() { eval("delete x; const x;"); }
1532 // The holder cannot be the function context. If it is, there
1802 // Get the RegExp function from the context in the literals array.
1803 // This is the RegExp function from the context in which the
1804 // function was created. We do not use the RegExp function from the
1805 // current global context because this might be the RegExp function
1979 // and the length of the target function.
1986 // Set the source code of the target function to undefined.
2023 CONVERT_ARG_CHECKED(JSFunction, function, 0);
2026 SetExpectedNofProperties(function, num);
3390 // Arguments array to replace function is match, captures, index and
4522 Object* function = frame->function();
4523 if (function->IsJSFunction() &&
4524 JSFunction::cast(function)->shared()->strict_mode()) {
4528 return function;
5314 // This function is only useful when it can be inlined and the
5321 // Use strict inequalities since in edge cases the function could be
6557 // custom powi() function than the generic pow().
6919 // This function works for dates from 1970 to 2099.
7115 // First argument is a function to use as a constructor.
7116 CONVERT_ARG_CHECKED(JSFunction, function, 0);
7138 Execution::New(function, total_argc, *param_data, &exception);
7149 Handle<JSFunction> function) {
7151 if (function->has_instance_prototype()) {
7152 prototype = Handle<Object>(function->instance_prototype(), isolate);
7154 if (function->shared()->CanGenerateInlineConstructor(*prototype)) {
7156 MaybeObject* code = compiler.CompileConstructStub(*function);
7158 function->shared()->set_construct_stub(
7171 // If the constructor isn't a proper function we throw a type error.
7179 Handle<JSFunction> function = Handle<JSFunction>::cast(constructor);
7181 // If function should not have prototype, construction is not allowed. In this
7182 // case generated code bailouts here, since function has no initial_map.
7183 if (!function->should_have_prototype()) {
7194 debug->HandleStepIn(function, Handle<Object>::null(), 0, true);
7198 if (function->has_initial_map()) {
7199 if (function->initial_map()->instance_type() == JS_FUNCTION_TYPE) {
7200 // The 'Function' function ignores the receiver object when
7206 // the shared part of the function. Since the receiver is
7209 // reported the same way whether or not 'Function' is called
7215 // The function should be compiled for the optimization hints to be
7217 // compilation through the shared function info which makes it
7219 Handle<SharedFunctionInfo> shared(function->shared(), isolate);
7220 if (!function->is_compiled()) CompileLazy(function, CLEAR_EXCEPTION);
7222 if (!function->has_initial_map() &&
7224 // The tracking is already in progress for another function. We can only
7226 // function is called as a constructor for the first time.
7231 Handle<JSObject> result = isolate->factory()->NewJSObject(function);
7235 TrySettingInlineConstructStub(isolate, function);
7249 CONVERT_ARG_CHECKED(JSFunction, function, 0);
7250 function->shared()->CompleteInobjectSlackTracking();
7251 TrySettingInlineConstructStub(isolate, function);
7261 Handle<JSFunction> function = args.at<JSFunction>(0);
7263 if (FLAG_trace_lazy && !function->shared()->is_compiled()) {
7265 function->PrintName();
7270 // Compile the target function. Here we compile using CompileLazyInLoop in
7277 ASSERT(!function->is_compiled());
7278 if (!CompileLazyInLoop(function, KEEP_EXCEPTION)) {
7283 ASSERT(function->is_compiled());
7284 return function->code();
7291 Handle<JSFunction> function = args.at<JSFunction>(0);
7292 // If the function is not optimizable or debugger is active continue using the
7294 if (!function->shared()->code()->optimizable() ||
7298 function->PrintName();
7300 function->shared()->code()->optimizable() ? "T" : "F",
7303 function->ReplaceCode(function->shared()->code());
7304 return function->code();
7306 if (CompileOptimized(function, AstNode::kNoNumber, CLEAR_EXCEPTION)) {
7307 return function->code();
7311 function->PrintName();
7314 function->ReplaceCode(function->shared()->code());
7315 return function->code();
7337 RUNTIME_ASSERT(frame->function()->IsJSFunction());
7338 Handle<JSFunction> function(JSFunction::cast(frame->function()), isolate);
7346 Accessors::FunctionGetArguments(*function,
7355 isolate->compilation_cache()->MarkForLazyOptimizing(function);
7357 RUNTIME_ASSERT(function->IsOptimized());
7359 RUNTIME_ASSERT(!function->IsOptimized());
7368 // Count the number of optimized activations of the function.
7372 if (frame->is_optimized() && frame->function() == *function) {
7379 // code when we have recursive invocations of the same function.
7383 function->PrintName();
7386 function->ReplaceCode(function->shared()->code());
7402 CONVERT_ARG_CHECKED(JSFunction, function, 0);
7403 if (!function->IsOptimized()) return isolate->heap()->undefined_value();
7405 Deoptimizer::DeoptimizeFunction(*function);
7414 CONVERT_ARG_CHECKED(JSFunction, function, 0);
7415 if (!function->IsOptimizable()) return isolate->heap()->undefined_value();
7416 function->MarkForLazyRecompilation();
7424 CONVERT_ARG_CHECKED(JSFunction, function, 0);
7426 // We're not prepared to handle a function with arguments object.
7427 ASSERT(!function->shared()->scope_info()->HasArgumentsShadow());
7429 // We have hit a back edge in an unoptimized frame for a function that was
7431 Handle<Code> unoptimized(function->shared()->code(), isolate);
7436 // activations of the function, it means (a) the function is directly or
7439 // Check for optimized activations of this function.
7443 succeeded = !frame->is_optimized() || frame->function() != *function;
7450 // The top JS function is this one, the PC is somewhere in the
7454 ASSERT(frame->function() == *function);
7477 function->PrintName();
7484 if (CompileOptimized(function, ast_id, CLEAR_EXCEPTION) &&
7485 function->IsOptimized()) {
7487 function->code()->deoptimization_data());
7507 function->PrintName();
7524 ASSERT(function->code()->kind() == Code::OPTIMIZED_FUNCTION);
7527 if (function->IsMarkedForLazyRecompilation()) {
7528 function->ReplaceCode(function->shared()->code());
7555 CONVERT_CHECKED(JSFunction, function, args[0]);
7556 int length = function->shared()->scope_info()->NumberOfContextSlots();
7559 isolate->heap()->AllocateFunctionContext(length, function);
7696 // Get the context extension function.
7757 // GetProperty function.
7917 // DEBUG builds) because we may want to be able to trace function
7974 // function name
7975 Object* fun = frame->function();
7981 // function arguments
7994 // function result
8178 // and return the compiled function bound in the local context.
8239 // 'eval' is not bound in the global context. Just call the function
8252 // Compare it to the builtin 'GlobalEval' function to make sure.
8275 // Compare it to the builtin 'GlobalEval' function to make sure.
8292 // This utility adjusts the property attributes for newly created Function
8293 // object ("new Function(...)") by changing the map.
8669 * A helper function that visits elements of a JSArray in numerical
9064 // Adds a JavaScript function as a debug event listener.
9065 // args[0]: debug event listener function to set or null or undefined for
9066 // clearing the event listener function
9153 // 3: Getter function if defined
9154 // 4: Setter function if defined
9388 // 2: Function
9447 Handle<JSFunction> function(JSFunction::cast(it.frame()->function()));
9448 Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info());
9480 // Traverse the context chain to the function context as all local
9481 // variables stored in the context will be on the function context.
9532 // the provided parameters whereas the function frame always have the number
9538 // parameters for the function and fill more if more parameters are provided.
9553 // Add the function (same as in function frame).
9554 details->set(kFrameDetailsFunctionIndex, it.frame()->function());
9606 // Add locals name and value from the temporary copy from the function frame.
9616 // Add the receiver (same as in function frame).
9675 Handle<JSFunction> function(JSFunction::cast(frame->function()));
9676 Handle<SharedFunctionInfo> shared(function->shared());
9681 // heap locals and extension properties of the debugged function.
9718 // Finally copy any properties from the function context extension. This will
9720 if (function_context->closure() == *function) {
9754 // Allocate and initialize a JSObject with all the content of theis function
9789 // Finally copy any properties from the function context extension. This will
9833 function_(JSFunction::cast(frame->function())),
9850 // The context_ is a with block from the outer function.
10233 // Set a break point in a function
10234 // args[0]: function
10235 // args[1]: number: break source position (within the function source)
10263 // compiled function and the actual requested break point might be in one of
10284 // If there is no candidate or this function is within the current
10292 // If a top-level function contain only one function
10293 // declartion the source for the top-level and the function is
10294 // the same. In that case prefer the non top-level function.
10301 // This containment check includes equality as a function inside
10302 // a top-level function can share either start or end position
10303 // with the top-level function.
10354 // Find position within function. The script position might be before the
10355 // source position of the first function.
10394 // function will default to affecting caught exceptions.
10471 // is linked to the function context supplied.
10474 // At the bottom of the chain. Return the function context to link to.
10488 // Helper function to find or create the arguments object for
10492 Handle<JSFunction> function,
10497 // found (that is the debugged function does not reference 'arguments' and
10517 isolate->factory()->NewArgumentsObject(function, length);
10531 "(function(arguments,__source__){return eval(__source__);})";
10536 // extension part has all the parameters and locals of the function on the
10537 // stack frame. A function which calls eval with the code to evaluate is then
10539 // replaces the context of the function on the stack frame a new (empty)
10540 // function is created as well to be used as the closure for the context.
10541 // This function and the context acts as replacements for the function on the
10544 // where the function on the stack frame is currently stopped.
10570 Handle<JSFunction> function(JSFunction::cast(frame->function()));
10571 Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info());
10584 // Create the (empty) function replacing the function on the stack frame for
10586 // that this function does not describe any parameters and local variables
10593 go_between->set_context(function->context());
10620 // Wrap the evaluation statement in a new function compiled in the newly
10621 // created context. The function has one parameter which has to be called
10623 // the function being debugged.
10624 // function(arguments,__source__) {return eval(__source__);}
10641 // Invoke the result of the compilation to get the evaluation function.
10650 function, scope_info,
10653 // Invoke the evaluation function and return the result.
10709 // Create a function context first, than put 'with' context on top of it.
10732 // Invoke the result of the compilation to get the evaluation function.
10770 // Helper function used by Runtime_DebugReferencedBy below.
10842 // args[1]: constructor function for instances to exclude (Mirror)
10858 // Get the constructor function for context extension and arguments array.
10891 // Helper function used by Runtime_DebugConstructedBy below.
10921 // Scan the heap for objects constructed by a specific function.
10983 // Get the function and make sure it is compiled.
10999 // Get the function and make sure it is compiled.
11078 // each function with all its descendant is always stored in a continues range
11079 // with the function itself going first. The root function is a script function.
11158 // and we check it in this function.
11165 // In a code of a parent function replaces original function as embedded object
11182 // Updates positions of a shared function info (first parameter) according
11228 CONVERT_ARG_CHECKED(JSFunction, function, 0);
11231 Handle<Code> code(function->code(), isolate);
11233 if (code->kind() != Code::FUNCTION &&
11259 // Calls specified function with or without entering the debugger.
11265 CONVERT_ARG_CHECKED(JSFunction, function, 0);
11272 result = Execution::Call(function, isolate->global(), 0, NULL,
11276 result = Execution::Call(function, isolate->global(), 0, NULL,
11544 // heap traversal to find the function generated for the source position
11595 // call to this function is encountered it is skipped. The seen_caller
11604 Object* raw_fun = frame->function();
11621 // element segments each containing a receiver, function, code and
11637 // If the caller parameter is a function we skip frames until we're
11648 // function.
11664 Handle<JSFunction> fun = frames[i].function();
11738 // There is no value in the cache. Invoke the function and cache result.
11764 // Function invocation may have cleared the cache. Reread all the data.
11911 static const Runtime::Function kIntrinsicFunctions[] = {
11945 const Runtime::Function* Runtime::FunctionForSymbol(Handle<String> name) {
11957 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {