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

Side by Side Diff: src/isolate.cc

Issue 24018009: Add -optimize-for-size flag to optimize for memory size (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: change to optimize-for-size 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
« no previous file with comments | « src/isolate.h ('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 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
1782 is_memory_constrained_(false),
1783 has_fatal_error_(false), 1779 has_fatal_error_(false),
1784 use_crankshaft_(true), 1780 use_crankshaft_(true),
1785 initialized_from_snapshot_(false), 1781 initialized_from_snapshot_(false),
1786 cpu_profiler_(NULL), 1782 cpu_profiler_(NULL),
1787 heap_profiler_(NULL), 1783 heap_profiler_(NULL),
1788 function_entry_hook_(NULL), 1784 function_entry_hook_(NULL),
1789 deferred_handles_head_(NULL), 1785 deferred_handles_head_(NULL),
1790 optimizing_compiler_thread_(this), 1786 optimizing_compiler_thread_(this),
1791 marking_thread_(NULL), 1787 marking_thread_(NULL),
1792 sweeper_thread_(NULL), 1788 sweeper_thread_(NULL),
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2131 Release_Store(&debugger_initialized_, true); 2127 Release_Store(&debugger_initialized_, true);
2132 #endif 2128 #endif
2133 } 2129 }
2134 2130
2135 2131
2136 bool Isolate::Init(Deserializer* des) { 2132 bool Isolate::Init(Deserializer* des) {
2137 ASSERT(state_ != INITIALIZED); 2133 ASSERT(state_ != INITIALIZED);
2138 TRACE_ISOLATE(init); 2134 TRACE_ISOLATE(init);
2139 2135
2140 stress_deopt_count_ = FLAG_deopt_every_n_times; 2136 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;
2143 2137
2144 has_fatal_error_ = false; 2138 has_fatal_error_ = false;
2145 2139
2146 use_crankshaft_ = FLAG_crankshaft 2140 use_crankshaft_ = FLAG_crankshaft
2147 && !Serializer::enabled() 2141 && !Serializer::enabled()
2148 && CPU::SupportsCrankshaft(); 2142 && CPU::SupportsCrankshaft();
2149 2143
2150 if (function_entry_hook() != NULL) { 2144 if (function_entry_hook() != NULL) {
2151 // When function entry hooking is in effect, we have to create the code 2145 // When function entry hooking is in effect, we have to create the code
2152 // stubs from scratch to get entry hooks, rather than loading the previously 2146 // stubs from scratch to get entry hooks, rather than loading the previously
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 2520
2527 #ifdef DEBUG 2521 #ifdef DEBUG
2528 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2522 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2529 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2523 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2530 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2524 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2531 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2525 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2532 #undef ISOLATE_FIELD_OFFSET 2526 #undef ISOLATE_FIELD_OFFSET
2533 #endif 2527 #endif
2534 2528
2535 } } // namespace v8::internal 2529 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698