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

Side by Side Diff: src/contexts.h

Issue 11093074: Get rid of static module allocation, do it in code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed last comments; added other back-ends Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/ast.cc ('k') | src/contexts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 set(GLOBAL_OBJECT_INDEX, object); 334 set(GLOBAL_OBJECT_INDEX, object);
335 } 335 }
336 336
337 // Returns a JSGlobalProxy object or null. 337 // Returns a JSGlobalProxy object or null.
338 JSObject* global_proxy(); 338 JSObject* global_proxy();
339 void set_global_proxy(JSObject* global); 339 void set_global_proxy(JSObject* global);
340 340
341 // The builtins object. 341 // The builtins object.
342 JSBuiltinsObject* builtins(); 342 JSBuiltinsObject* builtins();
343 343
344 // Get the innermost global context by traversing the context chain.
345 Context* global_context();
346
344 // Compute the native context by traversing the context chain. 347 // Compute the native context by traversing the context chain.
345 Context* native_context(); 348 Context* native_context();
346 349
347 // Predicates for context types. IsNativeContext is defined on Object 350 // Predicates for context types. IsNativeContext is defined on Object
348 // because we frequently have to know if arbitrary objects are natives 351 // because we frequently have to know if arbitrary objects are natives
349 // contexts. 352 // contexts.
350 bool IsFunctionContext() { 353 bool IsFunctionContext() {
351 Map* map = this->map(); 354 Map* map = this->map();
352 return map == map->GetHeap()->function_context_map(); 355 return map == map->GetHeap()->function_context_map();
353 } 356 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 #ifdef DEBUG 447 #ifdef DEBUG
445 // Bootstrapping-aware type checks. 448 // Bootstrapping-aware type checks.
446 static bool IsBootstrappingOrValidParentContext(Object* object, Context* kid); 449 static bool IsBootstrappingOrValidParentContext(Object* object, Context* kid);
447 static bool IsBootstrappingOrGlobalObject(Object* object); 450 static bool IsBootstrappingOrGlobalObject(Object* object);
448 #endif 451 #endif
449 }; 452 };
450 453
451 } } // namespace v8::internal 454 } } // namespace v8::internal
452 455
453 #endif // V8_CONTEXTS_H_ 456 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698