| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 237 | 237 | 
| 238   // Lookup a variable `name` in a ScriptContextTable. | 238   // Lookup a variable `name` in a ScriptContextTable. | 
| 239   // If it returns true, the variable is found and `result` contains | 239   // If it returns true, the variable is found and `result` contains | 
| 240   // valid information about its location. | 240   // valid information about its location. | 
| 241   // If it returns false, `result` is untouched. | 241   // If it returns false, `result` is untouched. | 
| 242   MUST_USE_RESULT | 242   MUST_USE_RESULT | 
| 243   static bool Lookup(Handle<ScriptContextTable> table, Handle<String> name, | 243   static bool Lookup(Handle<ScriptContextTable> table, Handle<String> name, | 
| 244                      LookupResult* result); | 244                      LookupResult* result); | 
| 245 | 245 | 
| 246   MUST_USE_RESULT | 246   MUST_USE_RESULT | 
|  | 247   static bool LookupLexical(Handle<ScriptContextTable> table, | 
|  | 248                             Handle<String> name); | 
|  | 249 | 
|  | 250   MUST_USE_RESULT | 
| 247   static Handle<ScriptContextTable> Extend(Handle<ScriptContextTable> table, | 251   static Handle<ScriptContextTable> Extend(Handle<ScriptContextTable> table, | 
| 248                                            Handle<Context> script_context); | 252                                            Handle<Context> script_context); | 
| 249 | 253 | 
| 250   static int GetContextOffset(int context_index) { | 254   static int GetContextOffset(int context_index) { | 
| 251     return kFirstContextOffset + context_index * kPointerSize; | 255     return kFirstContextOffset + context_index * kPointerSize; | 
| 252   } | 256   } | 
| 253 | 257 | 
| 254  private: | 258  private: | 
| 255   static const int kUsedSlot = 0; | 259   static const int kUsedSlot = 0; | 
| 256   static const int kFirstContextOffset = | 260   static const int kFirstContextOffset = | 
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 669   static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 673   static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 
| 670 #endif | 674 #endif | 
| 671 | 675 | 
| 672   STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 676   STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 
| 673   STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 677   STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 
| 674 }; | 678 }; | 
| 675 | 679 | 
| 676 } }  // namespace v8::internal | 680 } }  // namespace v8::internal | 
| 677 | 681 | 
| 678 #endif  // V8_CONTEXTS_H_ | 682 #endif  // V8_CONTEXTS_H_ | 
| OLD | NEW | 
|---|