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

Side by Side Diff: src/contexts.h

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Clean up test Created 4 years 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // Predicates for context types. IsNativeContext is also defined on Object 549 // Predicates for context types. IsNativeContext is also defined on Object
550 // because we frequently have to know if arbitrary objects are natives 550 // because we frequently have to know if arbitrary objects are natives
551 // contexts. 551 // contexts.
552 inline bool IsNativeContext(); 552 inline bool IsNativeContext();
553 inline bool IsFunctionContext(); 553 inline bool IsFunctionContext();
554 inline bool IsCatchContext(); 554 inline bool IsCatchContext();
555 inline bool IsWithContext(); 555 inline bool IsWithContext();
556 inline bool IsDebugEvaluateContext(); 556 inline bool IsDebugEvaluateContext();
557 inline bool IsBlockContext(); 557 inline bool IsBlockContext();
558 inline bool IsModuleContext(); 558 inline bool IsModuleContext();
559 inline bool IsEvalContext();
559 inline bool IsScriptContext(); 560 inline bool IsScriptContext();
560 561
561 inline bool HasSameSecurityTokenAs(Context* that); 562 inline bool HasSameSecurityTokenAs(Context* that);
562 563
563 // Removes a specific optimized code object from the optimized code map. 564 // Removes a specific optimized code object from the optimized code map.
564 // In case of non-OSR the code reference is cleared from the cache entry but 565 // In case of non-OSR the code reference is cleared from the cache entry but
565 // the entry itself is left in the map in order to proceed sharing literals. 566 // the entry itself is left in the map in order to proceed sharing literals.
566 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); 567 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason);
567 568
568 // Clear optimized code map. 569 // Clear optimized code map.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); 692 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
692 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 693 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
693 }; 694 };
694 695
695 typedef Context::Field ContextField; 696 typedef Context::Field ContextField;
696 697
697 } // namespace internal 698 } // namespace internal
698 } // namespace v8 699 } // namespace v8
699 700
700 #endif // V8_CONTEXTS_H_ 701 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/contexts.cc » ('j') | src/contexts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698