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

Side by Side Diff: src/d8.cc

Issue 559993005: Move configuration of ResourceConstraints to Isolate construction (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/api.cc ('k') | test/cctest/test-api.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 int result = 0; 1614 int result = 0;
1615 Isolate::CreateParams create_params; 1615 Isolate::CreateParams create_params;
1616 #if !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE) 1616 #if !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
1617 if (i::FLAG_gdbjit) { 1617 if (i::FLAG_gdbjit) {
1618 create_params.code_event_handler = i::GDBJITInterface::EventHandler; 1618 create_params.code_event_handler = i::GDBJITInterface::EventHandler;
1619 } 1619 }
1620 #endif 1620 #endif
1621 #ifdef ENABLE_VTUNE_JIT_INTERFACE 1621 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1622 vTune::InitializeVtuneForV8(create_params); 1622 vTune::InitializeVtuneForV8(create_params);
1623 #endif 1623 #endif
1624 #ifndef V8_SHARED
1625 create_params.constraints.ConfigureDefaults(
1626 base::SysInfo::AmountOfPhysicalMemory(),
1627 base::SysInfo::AmountOfVirtualMemory(),
1628 base::SysInfo::NumberOfProcessors());
1629 #endif
1624 Isolate* isolate = Isolate::New(create_params); 1630 Isolate* isolate = Isolate::New(create_params);
1625 #ifndef V8_SHARED
1626 v8::ResourceConstraints constraints;
1627 constraints.ConfigureDefaults(base::SysInfo::AmountOfPhysicalMemory(),
1628 base::SysInfo::AmountOfVirtualMemory(),
1629 base::SysInfo::NumberOfProcessors());
1630 v8::SetResourceConstraints(isolate, &constraints);
1631 #endif
1632 DumbLineEditor dumb_line_editor(isolate); 1631 DumbLineEditor dumb_line_editor(isolate);
1633 { 1632 {
1634 Isolate::Scope scope(isolate); 1633 Isolate::Scope scope(isolate);
1635 Initialize(isolate); 1634 Initialize(isolate);
1636 PerIsolateData data(isolate); 1635 PerIsolateData data(isolate);
1637 InitializeDebugger(isolate); 1636 InitializeDebugger(isolate);
1638 1637
1639 #ifndef V8_SHARED 1638 #ifndef V8_SHARED
1640 if (options.dump_heap_constants) { 1639 if (options.dump_heap_constants) {
1641 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate)); 1640 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate));
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 } 1690 }
1692 1691
1693 } // namespace v8 1692 } // namespace v8
1694 1693
1695 1694
1696 #ifndef GOOGLE3 1695 #ifndef GOOGLE3
1697 int main(int argc, char* argv[]) { 1696 int main(int argc, char* argv[]) {
1698 return v8::Shell::Main(argc, argv); 1697 return v8::Shell::Main(argc, argv);
1699 } 1698 }
1700 #endif 1699 #endif
OLDNEW
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698