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

Side by Side Diff: src/isolate.cc

Issue 23513062: Add flags to force or prevent setting of isolate.is_memory_constrained. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cleanup 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
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 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 thread_manager_(NULL), 1769 thread_manager_(NULL),
1770 fp_stubs_generated_(false), 1770 fp_stubs_generated_(false),
1771 has_installed_extensions_(false), 1771 has_installed_extensions_(false),
1772 string_tracker_(NULL), 1772 string_tracker_(NULL),
1773 regexp_stack_(NULL), 1773 regexp_stack_(NULL),
1774 date_cache_(NULL), 1774 date_cache_(NULL),
1775 code_stub_interface_descriptors_(NULL), 1775 code_stub_interface_descriptors_(NULL),
1776 // TODO(bmeurer) Initialized lazily because it depends on flags; can 1776 // TODO(bmeurer) Initialized lazily because it depends on flags; can
1777 // be fixed once the default isolate cleanup is done. 1777 // be fixed once the default isolate cleanup is done.
1778 random_number_generator_(NULL), 1778 random_number_generator_(NULL),
1779 // TODO(rmcilroy) Currently setting this based on
1780 // FLAG_force_memory_constrained in Isolate::Init; move to here when
1781 // isolate cleanup is done
1779 is_memory_constrained_(false), 1782 is_memory_constrained_(false),
1780 has_fatal_error_(false), 1783 has_fatal_error_(false),
1781 use_crankshaft_(true), 1784 use_crankshaft_(true),
1782 initialized_from_snapshot_(false), 1785 initialized_from_snapshot_(false),
1783 cpu_profiler_(NULL), 1786 cpu_profiler_(NULL),
1784 heap_profiler_(NULL), 1787 heap_profiler_(NULL),
1785 function_entry_hook_(NULL), 1788 function_entry_hook_(NULL),
1786 deferred_handles_head_(NULL), 1789 deferred_handles_head_(NULL),
1787 optimizing_compiler_thread_(this), 1790 optimizing_compiler_thread_(this),
1788 marking_thread_(NULL), 1791 marking_thread_(NULL),
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 Release_Store(&debugger_initialized_, true); 2131 Release_Store(&debugger_initialized_, true);
2129 #endif 2132 #endif
2130 } 2133 }
2131 2134
2132 2135
2133 bool Isolate::Init(Deserializer* des) { 2136 bool Isolate::Init(Deserializer* des) {
2134 ASSERT(state_ != INITIALIZED); 2137 ASSERT(state_ != INITIALIZED);
2135 TRACE_ISOLATE(init); 2138 TRACE_ISOLATE(init);
2136 2139
2137 stress_deopt_count_ = FLAG_deopt_every_n_times; 2140 stress_deopt_count_ = FLAG_deopt_every_n_times;
2141 if (FLAG_force_memory_constrained.has_value)
2142 is_memory_constrained_ = FLAG_force_memory_constrained.value;
2138 2143
2139 has_fatal_error_ = false; 2144 has_fatal_error_ = false;
2140 2145
2141 use_crankshaft_ = FLAG_crankshaft 2146 use_crankshaft_ = FLAG_crankshaft
2142 && !Serializer::enabled() 2147 && !Serializer::enabled()
2143 && CPU::SupportsCrankshaft(); 2148 && CPU::SupportsCrankshaft();
2144 2149
2145 if (function_entry_hook() != NULL) { 2150 if (function_entry_hook() != NULL) {
2146 // When function entry hooking is in effect, we have to create the code 2151 // When function entry hooking is in effect, we have to create the code
2147 // stubs from scratch to get entry hooks, rather than loading the previously 2152 // stubs from scratch to get entry hooks, rather than loading the previously
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2521 2526
2522 #ifdef DEBUG 2527 #ifdef DEBUG
2523 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2528 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2524 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2529 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2525 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2530 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2526 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2531 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2527 #undef ISOLATE_FIELD_OFFSET 2532 #undef ISOLATE_FIELD_OFFSET
2528 #endif 2533 #endif
2529 2534
2530 } } // namespace v8::internal 2535 } } // namespace v8::internal
OLDNEW
« src/flag-definitions.h ('K') | « src/flags.cc ('k') | test/cctest/test-flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698