Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: src/contexts.h

Issue 2345823002: [modules] Turn JSModule into Module. (Closed)
Patch Set: Cosmetics. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_CONTEXTS_H_ 5 #ifndef V8_CONTEXTS_H_
6 #define V8_CONTEXTS_H_ 6 #define V8_CONTEXTS_H_
7 7
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \ 223 V(SYMBOL_FUNCTION_INDEX, JSFunction, symbol_function) \
224 V(TYPED_ARRAY_FUN_INDEX, JSFunction, typed_array_function) \ 224 V(TYPED_ARRAY_FUN_INDEX, JSFunction, typed_array_function) \
225 V(TYPED_ARRAY_PROTOTYPE_INDEX, JSObject, typed_array_prototype) \ 225 V(TYPED_ARRAY_PROTOTYPE_INDEX, JSObject, typed_array_prototype) \
226 V(UINT16_ARRAY_FUN_INDEX, JSFunction, uint16_array_fun) \ 226 V(UINT16_ARRAY_FUN_INDEX, JSFunction, uint16_array_fun) \
227 V(UINT16X8_FUNCTION_INDEX, JSFunction, uint16x8_function) \ 227 V(UINT16X8_FUNCTION_INDEX, JSFunction, uint16x8_function) \
228 V(UINT32_ARRAY_FUN_INDEX, JSFunction, uint32_array_fun) \ 228 V(UINT32_ARRAY_FUN_INDEX, JSFunction, uint32_array_fun) \
229 V(UINT32X4_FUNCTION_INDEX, JSFunction, uint32x4_function) \ 229 V(UINT32X4_FUNCTION_INDEX, JSFunction, uint32x4_function) \
230 V(UINT8_ARRAY_FUN_INDEX, JSFunction, uint8_array_fun) \ 230 V(UINT8_ARRAY_FUN_INDEX, JSFunction, uint8_array_fun) \
231 V(UINT8_CLAMPED_ARRAY_FUN_INDEX, JSFunction, uint8_clamped_array_fun) \ 231 V(UINT8_CLAMPED_ARRAY_FUN_INDEX, JSFunction, uint8_clamped_array_fun) \
232 V(UINT8X16_FUNCTION_INDEX, JSFunction, uint8x16_function) \ 232 V(UINT8X16_FUNCTION_INDEX, JSFunction, uint8x16_function) \
233 V(CURRENT_MODULE_INDEX, JSModule, current_module) \ 233 V(CURRENT_MODULE_INDEX, Module, current_module) \
234 NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \ 234 NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \
235 NATIVE_CONTEXT_IMPORTED_FIELDS(V) 235 NATIVE_CONTEXT_IMPORTED_FIELDS(V)
236 236
237 // A table of all script contexts. Every loaded top-level script with top-level 237 // A table of all script contexts. Every loaded top-level script with top-level
238 // lexical declarations contributes its ScriptContext into this table. 238 // lexical declarations contributes its ScriptContext into this table.
239 // 239 //
240 // The table is a fixed array, its first slot is the current used count and 240 // The table is a fixed array, its first slot is the current used count and
241 // the subsequent slots 1..used contain ScriptContexts. 241 // the subsequent slots 1..used contain ScriptContexts.
242 class ScriptContextTable : public FixedArray { 242 class ScriptContextTable : public FixedArray {
243 public: 243 public:
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 inline bool has_extension(); 397 inline bool has_extension();
398 inline HeapObject* extension(); 398 inline HeapObject* extension();
399 inline void set_extension(HeapObject* object); 399 inline void set_extension(HeapObject* object);
400 JSObject* extension_object(); 400 JSObject* extension_object();
401 JSReceiver* extension_receiver(); 401 JSReceiver* extension_receiver();
402 ScopeInfo* scope_info(); 402 ScopeInfo* scope_info();
403 String* catch_name(); 403 String* catch_name();
404 404
405 // Find the module context (assuming there is one) and return the associated 405 // Find the module context (assuming there is one) and return the associated
406 // module object. 406 // module object.
407 JSModule* module(); 407 Module* module();
408 408
409 // Get the context where var declarations will be hoisted to, which 409 // Get the context where var declarations will be hoisted to, which
410 // may be the context itself. 410 // may be the context itself.
411 Context* declaration_context(); 411 Context* declaration_context();
412 bool is_declaration_context(); 412 bool is_declaration_context();
413 413
414 // Get the next closure's context on the context chain. 414 // Get the next closure's context on the context chain.
415 Context* closure_context(); 415 Context* closure_context();
416 416
417 // Returns a JSGlobalProxy object or null. 417 // Returns a JSGlobalProxy object or null.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 #endif 547 #endif
548 548
549 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 549 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
550 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 550 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
551 }; 551 };
552 552
553 } // namespace internal 553 } // namespace internal
554 } // namespace v8 554 } // namespace v8
555 555
556 #endif // V8_CONTEXTS_H_ 556 #endif // V8_CONTEXTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698