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

Side by Side Diff: src/isolate.h

Issue 23464022: Add a ResourceConstraint for the embedder to specify that V8 is running on a memory constrained dev… (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Use Maybe template Created 7 years, 3 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
« include/v8.h ('K') | « src/api.cc ('k') | no next file » | 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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 FunctionEntryHook function_entry_hook() { return function_entry_hook_; } 1121 FunctionEntryHook function_entry_hook() { return function_entry_hook_; }
1122 void set_function_entry_hook(FunctionEntryHook function_entry_hook) { 1122 void set_function_entry_hook(FunctionEntryHook function_entry_hook) {
1123 function_entry_hook_ = function_entry_hook; 1123 function_entry_hook_ = function_entry_hook;
1124 } 1124 }
1125 1125
1126 void* stress_deopt_count_address() { return &stress_deopt_count_; } 1126 void* stress_deopt_count_address() { return &stress_deopt_count_; }
1127 1127
1128 // Given an address occupied by a live code object, return that object. 1128 // Given an address occupied by a live code object, return that object.
1129 Object* FindCodeObject(Address a); 1129 Object* FindCodeObject(Address a);
1130 1130
1131 bool is_memory_constrained() const {
1132 return is_memory_constrained_;
1133 }
1134 void set_is_memory_constrained(bool value) {
1135 is_memory_constrained_ = value;
1136 }
1137
1131 private: 1138 private:
1132 Isolate(); 1139 Isolate();
1133 1140
1134 friend struct GlobalState; 1141 friend struct GlobalState;
1135 friend struct InitializeGlobalState; 1142 friend struct InitializeGlobalState;
1136 1143
1137 enum State { 1144 enum State {
1138 UNINITIALIZED, // Some components may not have been allocated. 1145 UNINITIALIZED, // Some components may not have been allocated.
1139 INITIALIZED // All components are fully initialized. 1146 INITIALIZED // All components are fully initialized.
1140 }; 1147 };
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; 1304 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_;
1298 ConsStringIteratorOp objects_string_compare_iterator_a_; 1305 ConsStringIteratorOp objects_string_compare_iterator_a_;
1299 ConsStringIteratorOp objects_string_compare_iterator_b_; 1306 ConsStringIteratorOp objects_string_compare_iterator_b_;
1300 StaticResource<ConsStringIteratorOp> objects_string_iterator_; 1307 StaticResource<ConsStringIteratorOp> objects_string_iterator_;
1301 unibrow::Mapping<unibrow::Ecma262Canonicalize> 1308 unibrow::Mapping<unibrow::Ecma262Canonicalize>
1302 regexp_macro_assembler_canonicalize_; 1309 regexp_macro_assembler_canonicalize_;
1303 RegExpStack* regexp_stack_; 1310 RegExpStack* regexp_stack_;
1304 DateCache* date_cache_; 1311 DateCache* date_cache_;
1305 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; 1312 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
1306 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; 1313 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_;
1314 bool is_memory_constrained_;
1307 1315
1308 // True if fatal error has been signaled for this isolate. 1316 // True if fatal error has been signaled for this isolate.
1309 bool has_fatal_error_; 1317 bool has_fatal_error_;
1310 1318
1311 // True if we are using the Crankshaft optimizing compiler. 1319 // True if we are using the Crankshaft optimizing compiler.
1312 bool use_crankshaft_; 1320 bool use_crankshaft_;
1313 1321
1314 // True if this isolate was initialized from a snapshot. 1322 // True if this isolate was initialized from a snapshot.
1315 bool initialized_from_snapshot_; 1323 bool initialized_from_snapshot_;
1316 1324
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 1533
1526 // Mark the native context with out of memory. 1534 // Mark the native context with out of memory.
1527 inline void Context::mark_out_of_memory() { 1535 inline void Context::mark_out_of_memory() {
1528 native_context()->set_out_of_memory(HEAP->true_value()); 1536 native_context()->set_out_of_memory(HEAP->true_value());
1529 } 1537 }
1530 1538
1531 1539
1532 } } // namespace v8::internal 1540 } } // namespace v8::internal
1533 1541
1534 #endif // V8_ISOLATE_H_ 1542 #endif // V8_ISOLATE_H_
OLDNEW
« include/v8.h ('K') | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698