OLD | NEW |
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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 void AddOptimizedCode(Code* code); | 445 void AddOptimizedCode(Code* code); |
446 void SetOptimizedCodeListHead(Object* head); | 446 void SetOptimizedCodeListHead(Object* head); |
447 Object* OptimizedCodeListHead(); | 447 Object* OptimizedCodeListHead(); |
448 void SetDeoptimizedCodeListHead(Object* head); | 448 void SetDeoptimizedCodeListHead(Object* head); |
449 Object* DeoptimizedCodeListHead(); | 449 Object* DeoptimizedCodeListHead(); |
450 | 450 |
451 Handle<Object> ErrorMessageForCodeGenerationFromStrings(); | 451 Handle<Object> ErrorMessageForCodeGenerationFromStrings(); |
452 | 452 |
453 static int ImportedFieldIndexForName(Handle<String> name); | 453 static int ImportedFieldIndexForName(Handle<String> name); |
454 static int IntrinsicIndexForName(Handle<String> name); | 454 static int IntrinsicIndexForName(Handle<String> name); |
| 455 static int IntrinsicIndexForName(const unsigned char* name, int length); |
455 | 456 |
456 #define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \ | 457 #define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \ |
457 inline void set_##name(type* value); \ | 458 inline void set_##name(type* value); \ |
458 inline bool is_##name(type* value); \ | 459 inline bool is_##name(type* value); \ |
459 inline type* name(); | 460 inline type* name(); |
460 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) | 461 NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) |
461 #undef NATIVE_CONTEXT_FIELD_ACCESSORS | 462 #undef NATIVE_CONTEXT_FIELD_ACCESSORS |
462 | 463 |
463 // Lookup the slot called name, starting with the current context. | 464 // Lookup the slot called name, starting with the current context. |
464 // There are three possibilities: | 465 // There are three possibilities: |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 #endif | 539 #endif |
539 | 540 |
540 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 541 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
541 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 542 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
542 }; | 543 }; |
543 | 544 |
544 } // namespace internal | 545 } // namespace internal |
545 } // namespace v8 | 546 } // namespace v8 |
546 | 547 |
547 #endif // V8_CONTEXTS_H_ | 548 #endif // V8_CONTEXTS_H_ |
OLD | NEW |