Home | History | Annotate | Download | only in src

Lines Matching defs:function

997   // Fetch the constructor function of the object.
1001 // Iterate through the chain of inheriting function templates to
1181 // Getter is not a function.
1981 JSFunction* function = JSFunction::cast(this);
1982 Object* fun_name = function->shared()->DebugName();
1987 accumulator->Add("<JS Function ");
1993 accumulator->Add("<JS Function");
1996 reinterpret_cast<void*>(function->shared()));
2511 // TODO(adamk): According to ES2015, we should return "Function" when
2576 JSFunction* function;
2578 function = JSFunction::cast(constructor);
2583 function = JSFunction::cast(this);
2586 return function->context()->native_context();
5074 Handle<JSBoundFunction> function) {
5075 DCHECK(function->map()->is_constructor());
5077 handle(function->bound_target_function()));
5082 Handle<Context> JSFunction::GetFunctionRealm(Handle<JSFunction> function) {
5083 DCHECK(function->map()->is_constructor());
5084 return handle(function->context()->native_context());
7501 // Get the constructor function for arguments array.
8684 // Helper function for JSReceiver::GetKeys() below. Can be called recursively.
9287 // Strict and strong function maps have Function as a constructor but the
9288 // Function's initial map is a sloppy function map. Same holds for
9601 // Initial map for sloppy mode function is stored in the function
12269 // JSFunctions require more checks to ensure that sloppy function is
12270 // not equvalent to strict function.
12308 // Do not optimize if function contains break points.
12331 // code on a function that is already optimized, since OSR and regular
12627 // Replace the pointer to the exact constructor with the Object function
12861 void JSFunction::SetInstancePrototype(Handle<JSFunction> function,
12863 Isolate* isolate = function->GetIsolate();
12868 // function as a constructor.
12869 if (function->has_initial_map()) {
12870 // If the function has allocated the initial map replace it with a
12874 function->CompleteInobjectSlackTrackingIfActive();
12876 Handle<Map> initial_map(function->initial_map(), isolate);
12883 function->set_prototype_or_initial_map(*value);
12886 if (function->map()->is_strong()) {
12889 JSFunction::SetInitialMap(function, new_map, value);
12891 // If the function is used as the global Array function, cache the
12893 Handle<Context> native_context(function->context()->native_context(),
12898 *function == JSFunction::cast(*array_function)) {
12913 function->set_prototype_or_initial_map(*value);
12924 void JSFunction::SetPrototype(Handle<JSFunction> function,
12926 DCHECK(function->IsConstructor());
12937 Handle<Map> new_map = Map::Copy(handle(function->map()), "SetPrototype");
12939 JSObject::MigrateToMap(function, new_map);
12944 function->context()->native_context()->initial_object_prototype(),
12947 function->map()->set_non_instance_prototype(false);
12950 return SetInstancePrototype(function, construct_prototype);
12977 void JSFunction::SetInitialMap(Handle<JSFunction> function, Handle<Map> map,
12982 function->set_prototype_or_initial_map(*map);
12983 map->SetConstructor(*function);
12987 reinterpret_cast<void*>(*map), function->shared()->unique_id(),
12988 function->shared()->DebugName()->ToCString().get());
13064 void JSFunction::EnsureHasInitialMap(Handle<JSFunction> function) {
13065 DCHECK(function->IsConstructor() || function->shared()->is_generator());
13066 if (function->has_initial_map()) return;
13067 Isolate* isolate = function->GetIsolate();
13071 Compiler::Compile(function, CLEAR_EXCEPTION);
13074 // suggested by the function.
13076 if (function->shared()->is_generator()) {
13083 function->CalculateInstanceSize(instance_type, 0, &instance_size,
13087 if (function->map()->is_strong()) {
13093 if (function->has_instance_prototype()) {
13094 prototype = handle(function->instance_prototype(), isolate);
13096 prototype = isolate->factory()->NewFunctionPrototype(function);
13102 // Finally link initial map and constructor function.
13104 JSFunction::SetInitialMap(function, map, prototype);
13122 Handle<JSFunction> function = Handle<JSFunction>::cast(new_target);
13124 // Check that |function|'s initial map still in sync with the |constructor|,
13125 // otherwise we must create a new initial map for |function|.
13126 if (function->has_initial_map() &&
13127 function->initial_map()->GetConstructor() == *constructor) {
13128 return handle(function->initial_map(), isolate);
13132 // suggested by |function|.
13134 // Link initial map and constructor function if the new.target is actually a
13136 if (IsSubclassConstructor(function->shared()->kind())) {
13137 Handle<Object> prototype(function->instance_prototype(), isolate);
13146 function->CalculateInstanceSizeForDerivedClass(
13156 JSFunction::SetInitialMap(function, map, prototype);
13168 Handle<JSFunction> function = Handle<JSFunction>::cast(new_target);
13170 EnsureHasInitialMap(function);
13171 prototype = handle(function->prototype(), isolate);
13217 // The filter is a pattern that matches function names in this way:
13219 // "-" all but the top-level function
13220 // "-name" all but the function "name"
13221 // "" only the top-level function
13222 // "name" only the function "name"
13254 Handle<String> JSFunction::GetName(Handle<JSFunction> function) {
13255 Isolate* isolate = function->GetIsolate();
13257 JSReceiver::GetDataProperty(function, isolate->factory()->name_string());
13259 return handle(function->shared()->DebugName(), isolate);
13263 Handle<String> JSFunction::GetDebugName(Handle<JSFunction> function) {
13264 Isolate* isolate = function->GetIsolate();
13266 function, isolate->factory()->display_name_string());
13268 return JSFunction::GetName(function);
13274 char const kNativeCodeSource[] = "function () { [native code] }";
13282 builder.AppendCString("function ");
13294 Handle<String> JSBoundFunction::ToString(Handle<JSBoundFunction> function) {
13295 Isolate* const isolate = function->GetIsolate();
13301 Handle<String> JSFunction::ToString(Handle<JSFunction> function) {
13302 Isolate* const isolate = function->GetIsolate();
13303 Handle<SharedFunctionInfo> shared_info(function->shared(), isolate);
13305 // Check if {function} should hide its source code.
13311 // Check if we should print {function} as a class.
13313 function, isolate->factory()->class_start_position_symbol());
13316 function, isolate->factory()->class_end_position_symbol());
13324 // Check if we have source code for the {function}.
13335 builder.AppendCString("function* ");
13337 builder.AppendCString("function ");
13463 // Do not check against pending exception, since this function may be called
13547 // Add shared function info to new script's list. If a collection occurs,
13548 // the shared function info may be temporarily in two lists.
13577 // Remove shared function info from old script's list.
13586 // Remove shared function info from root array.
13618 // Check that the function has a script associated with it.
13688 // Get the source for the script which this function came from.
13697 os << "function ";
13749 // Disable optimization for the shared function info and mark the
13750 // code as non-optimizable. The marker on the shared function info
13753 // regenerated and set on the shared function info it is marked as
13755 // function info.
13760 DCHECK(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN);
13833 if (code()->kind() == Code::FUNCTION) {
14071 // source for this function is found.
14321 DCHECK(kind() == FUNCTION);
14332 DCHECK(kind() == FUNCTION);
14414 (kind() == FUNCTION && !has_debug_break_slots()))
14626 os << "{ast_id=" << ast_id << ", function="
14637 os << "{bytecode_offset=" << bytecode_offset << ", function="
14644 os << "{function}";
14659 os << "{function="
14669 os << "{function=" << Brief(SharedFunctionInfo::cast(shared_info)
14884 : kind() == Code::FUNCTION
14894 int back_edge_offset = (kind() == Code::FUNCTION)
14922 if (kind() == FUNCTION) {
14954 } else if (kind() == FUNCTION) {
14984 if (kind() == FUNCTION) {
15977 // function, so we shouldn't make new instances of it very often.
16165 // Certain compilers request function template instantiation when they
16168 // together, so even though this function belongs in objects-debug.cc,
16956 // use this function.
17853 // We need a key instance for the virtual hash function.
17921 // Cache key is the tuple (source, outer shared function info, scope position)
18006 // to the stored value with a custon IsMatch function during lookups.
18033 if (info->code()->kind() != Code::FUNCTION || info->code()->IsOld()) {