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

Side by Side Diff: src/contexts.h

Issue 11438042: Allow lazy compilation (and thus optimisation) of functions inside eval. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/lithium.h » ('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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 // The builtins object. 345 // The builtins object.
346 JSBuiltinsObject* builtins(); 346 JSBuiltinsObject* builtins();
347 347
348 // Get the innermost global context by traversing the context chain. 348 // Get the innermost global context by traversing the context chain.
349 Context* global_context(); 349 Context* global_context();
350 350
351 // Compute the native context by traversing the context chain. 351 // Compute the native context by traversing the context chain.
352 Context* native_context(); 352 Context* native_context();
353 353
354 // Predicates for context types. IsNativeContext is defined on Object 354 // Predicates for context types. IsNativeContext is also defined on Object
355 // because we frequently have to know if arbitrary objects are natives 355 // because we frequently have to know if arbitrary objects are natives
356 // contexts. 356 // contexts.
357 bool IsNativeContext() {
358 Map* map = this->map();
359 return map == map->GetHeap()->native_context_map();
360 }
357 bool IsFunctionContext() { 361 bool IsFunctionContext() {
358 Map* map = this->map(); 362 Map* map = this->map();
359 return map == map->GetHeap()->function_context_map(); 363 return map == map->GetHeap()->function_context_map();
360 } 364 }
361 bool IsCatchContext() { 365 bool IsCatchContext() {
362 Map* map = this->map(); 366 Map* map = this->map();
363 return map == map->GetHeap()->catch_context_map(); 367 return map == map->GetHeap()->catch_context_map();
364 } 368 }
365 bool IsWithContext() { 369 bool IsWithContext() {
366 Map* map = this->map(); 370 Map* map = this->map();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 static bool IsBootstrappingOrGlobalObject(Object* object); 458 static bool IsBootstrappingOrGlobalObject(Object* object);
455 #endif 459 #endif
456 460
457 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); 461 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize);
458 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 462 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
459 }; 463 };
460 464
461 } } // namespace v8::internal 465 } } // namespace v8::internal
462 466
463 #endif // V8_CONTEXTS_H_ 467 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/lithium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698