OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 7451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7462 // JSFunction describes JavaScript functions. | 7462 // JSFunction describes JavaScript functions. |
7463 class JSFunction: public JSObject { | 7463 class JSFunction: public JSObject { |
7464 public: | 7464 public: |
7465 // [prototype_or_initial_map]: | 7465 // [prototype_or_initial_map]: |
7466 DECL_ACCESSORS(prototype_or_initial_map, Object) | 7466 DECL_ACCESSORS(prototype_or_initial_map, Object) |
7467 | 7467 |
7468 // [shared]: The information about the function that | 7468 // [shared]: The information about the function that |
7469 // can be shared by instances. | 7469 // can be shared by instances. |
7470 DECL_ACCESSORS(shared, SharedFunctionInfo) | 7470 DECL_ACCESSORS(shared, SharedFunctionInfo) |
7471 | 7471 |
| 7472 static const int kLengthDescriptorIndex = 0; |
| 7473 static const int kNameDescriptorIndex = 1; |
| 7474 |
7472 // [context]: The context for this function. | 7475 // [context]: The context for this function. |
7473 inline Context* context(); | 7476 inline Context* context(); |
7474 inline void set_context(Object* context); | 7477 inline void set_context(Object* context); |
7475 inline JSObject* global_proxy(); | 7478 inline JSObject* global_proxy(); |
7476 inline Context* native_context(); | 7479 inline Context* native_context(); |
7477 | 7480 |
7478 static Handle<Object> GetName(Isolate* isolate, Handle<JSFunction> function); | 7481 static Handle<Object> GetName(Isolate* isolate, Handle<JSFunction> function); |
7479 static MaybeHandle<Smi> GetLength(Isolate* isolate, | 7482 static MaybeHandle<Smi> GetLength(Isolate* isolate, |
7480 Handle<JSFunction> function); | 7483 Handle<JSFunction> function); |
7481 static Handle<Context> GetFunctionRealm(Handle<JSFunction> function); | 7484 static Handle<Context> GetFunctionRealm(Handle<JSFunction> function); |
(...skipping 3308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10790 } | 10793 } |
10791 return value; | 10794 return value; |
10792 } | 10795 } |
10793 }; | 10796 }; |
10794 | 10797 |
10795 | 10798 |
10796 } // NOLINT, false-positive due to second-order macros. | 10799 } // NOLINT, false-positive due to second-order macros. |
10797 } // NOLINT, false-positive due to second-order macros. | 10800 } // NOLINT, false-positive due to second-order macros. |
10798 | 10801 |
10799 #endif // V8_OBJECTS_H_ | 10802 #endif // V8_OBJECTS_H_ |
OLD | NEW |