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

Side by Side Diff: src/contexts.h

Issue 208263002: Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months 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/code-stubs.h ('k') | src/elements.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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \ 155 V(FUNCTION_CACHE_INDEX, JSObject, function_cache) \
156 V(JSFUNCTION_RESULT_CACHES_INDEX, FixedArray, jsfunction_result_caches) \ 156 V(JSFUNCTION_RESULT_CACHES_INDEX, FixedArray, jsfunction_result_caches) \
157 V(NORMALIZED_MAP_CACHE_INDEX, NormalizedMapCache, normalized_map_cache) \ 157 V(NORMALIZED_MAP_CACHE_INDEX, NormalizedMapCache, normalized_map_cache) \
158 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \ 158 V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \
159 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \ 159 V(CALL_AS_FUNCTION_DELEGATE_INDEX, JSFunction, call_as_function_delegate) \
160 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \ 160 V(CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, JSFunction, \
161 call_as_constructor_delegate) \ 161 call_as_constructor_delegate) \
162 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \ 162 V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \
163 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \ 163 V(OPAQUE_REFERENCE_FUNCTION_INDEX, JSFunction, opaque_reference_function) \
164 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \ 164 V(CONTEXT_EXTENSION_FUNCTION_INDEX, JSFunction, context_extension_function) \
165 V(OUT_OF_MEMORY_INDEX, Object, out_of_memory) \
166 V(MAP_CACHE_INDEX, Object, map_cache) \ 165 V(MAP_CACHE_INDEX, Object, map_cache) \
167 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \ 166 V(EMBEDDER_DATA_INDEX, FixedArray, embedder_data) \
168 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \ 167 V(ALLOW_CODE_GEN_FROM_STRINGS_INDEX, Object, allow_code_gen_from_strings) \
169 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \ 168 V(ERROR_MESSAGE_FOR_CODE_GEN_FROM_STRINGS_INDEX, Object, \
170 error_message_for_code_gen_from_strings) \ 169 error_message_for_code_gen_from_strings) \
171 V(RUN_MICROTASKS_INDEX, JSFunction, run_microtasks) \ 170 V(RUN_MICROTASKS_INDEX, JSFunction, run_microtasks) \
172 V(ENQUEUE_EXTERNAL_MICROTASK_INDEX, JSFunction, enqueue_external_microtask) \ 171 V(ENQUEUE_EXTERNAL_MICROTASK_INDEX, JSFunction, enqueue_external_microtask) \
173 V(IS_PROMISE_INDEX, JSFunction, is_promise) \ 172 V(IS_PROMISE_INDEX, JSFunction, is_promise) \
174 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \ 173 V(PROMISE_CREATE_INDEX, JSFunction, promise_create) \
175 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \ 174 V(PROMISE_RESOLVE_INDEX, JSFunction, promise_resolve) \
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 432 }
434 bool IsModuleContext() { 433 bool IsModuleContext() {
435 Map* map = this->map(); 434 Map* map = this->map();
436 return map == map->GetHeap()->module_context_map(); 435 return map == map->GetHeap()->module_context_map();
437 } 436 }
438 bool IsGlobalContext() { 437 bool IsGlobalContext() {
439 Map* map = this->map(); 438 Map* map = this->map();
440 return map == map->GetHeap()->global_context_map(); 439 return map == map->GetHeap()->global_context_map();
441 } 440 }
442 441
443 // Tells whether the native context is marked with out of memory.
444 inline bool has_out_of_memory();
445
446 // Mark the native context with out of memory.
447 inline void mark_out_of_memory();
448
449 // A native context holds a list of all functions with optimized code. 442 // A native context holds a list of all functions with optimized code.
450 void AddOptimizedFunction(JSFunction* function); 443 void AddOptimizedFunction(JSFunction* function);
451 void RemoveOptimizedFunction(JSFunction* function); 444 void RemoveOptimizedFunction(JSFunction* function);
452 void SetOptimizedFunctionsListHead(Object* head); 445 void SetOptimizedFunctionsListHead(Object* head);
453 Object* OptimizedFunctionsListHead(); 446 Object* OptimizedFunctionsListHead();
454 447
455 // The native context also stores a list of all optimized code and a 448 // The native context also stores a list of all optimized code and a
456 // list of all deoptimized code, which are needed by the deoptimizer. 449 // list of all deoptimized code, which are needed by the deoptimizer.
457 void AddOptimizedCode(Code* code); 450 void AddOptimizedCode(Code* code);
458 void SetOptimizedCodeListHead(Object* head); 451 void SetOptimizedCodeListHead(Object* head);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 530 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
538 #endif 531 #endif
539 532
540 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); 533 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize);
541 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 534 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
542 }; 535 };
543 536
544 } } // namespace v8::internal 537 } } // namespace v8::internal
545 538
546 #endif // V8_CONTEXTS_H_ 539 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698