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

Side by Side Diff: src/d8.cc

Issue 24989003: Re-land "Add methods to enable configuration of ResourceConstraints based on limits derived at..." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reland original CL. Created 7 years, 2 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 | « include/v8-testing.h ('k') | src/defaults.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 #ifdef V8_SHARED 43 #ifdef V8_SHARED
44 #include <assert.h> 44 #include <assert.h>
45 #endif // V8_SHARED 45 #endif // V8_SHARED
46 46
47 #ifndef V8_SHARED 47 #ifndef V8_SHARED
48 #include <algorithm> 48 #include <algorithm>
49 #endif // !V8_SHARED 49 #endif // !V8_SHARED
50 50
51 #ifdef V8_SHARED 51 #ifdef V8_SHARED
52 #include "../include/v8-defaults.h"
52 #include "../include/v8-testing.h" 53 #include "../include/v8-testing.h"
53 #endif // V8_SHARED 54 #endif // V8_SHARED
54 55
55 #ifdef ENABLE_VTUNE_JIT_INTERFACE 56 #ifdef ENABLE_VTUNE_JIT_INTERFACE
56 #include "third_party/vtune/v8-vtune.h" 57 #include "third_party/vtune/v8-vtune.h"
57 #endif 58 #endif
58 59
59 #include "d8.h" 60 #include "d8.h"
60 61
61 #ifndef V8_SHARED 62 #ifndef V8_SHARED
62 #include "api.h" 63 #include "api.h"
63 #include "checks.h" 64 #include "checks.h"
64 #include "d8-debug.h" 65 #include "d8-debug.h"
65 #include "debug.h" 66 #include "debug.h"
66 #include "natives.h" 67 #include "natives.h"
67 #include "platform.h" 68 #include "platform.h"
68 #include "v8.h" 69 #include "v8.h"
70 #include "v8-defaults.h"
69 #endif // V8_SHARED 71 #endif // V8_SHARED
70 72
71 #if !defined(_WIN32) && !defined(_WIN64) 73 #if !defined(_WIN32) && !defined(_WIN64)
72 #include <unistd.h> // NOLINT 74 #include <unistd.h> // NOLINT
73 #endif 75 #endif
74 76
75 #ifndef ASSERT 77 #ifndef ASSERT
76 #define ASSERT(condition) assert(condition) 78 #define ASSERT(condition) assert(condition)
77 #endif 79 #endif
78 80
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 1644
1643 1645
1644 int Shell::Main(int argc, char* argv[]) { 1646 int Shell::Main(int argc, char* argv[]) {
1645 if (!SetOptions(argc, argv)) return 1; 1647 if (!SetOptions(argc, argv)) return 1;
1646 v8::V8::InitializeICU(); 1648 v8::V8::InitializeICU();
1647 #ifndef V8_SHARED 1649 #ifndef V8_SHARED
1648 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; 1650 i::FLAG_trace_hydrogen_file = "hydrogen.cfg";
1649 #else 1651 #else
1650 SetStandaloneFlagsViaCommandLine(); 1652 SetStandaloneFlagsViaCommandLine();
1651 #endif 1653 #endif
1654 v8::SetDefaultResourceConstraintsForCurrentPlatform();
1652 ShellArrayBufferAllocator array_buffer_allocator; 1655 ShellArrayBufferAllocator array_buffer_allocator;
1653 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); 1656 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
1654 int result = 0; 1657 int result = 0;
1655 Isolate* isolate = Isolate::GetCurrent(); 1658 Isolate* isolate = Isolate::GetCurrent();
1656 DumbLineEditor dumb_line_editor(isolate); 1659 DumbLineEditor dumb_line_editor(isolate);
1657 { 1660 {
1658 Initialize(isolate); 1661 Initialize(isolate);
1659 #ifdef ENABLE_VTUNE_JIT_INTERFACE 1662 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1660 vTune::InitializeVtuneForV8(); 1663 vTune::InitializeVtuneForV8();
1661 #endif 1664 #endif
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 } 1729 }
1727 1730
1728 } // namespace v8 1731 } // namespace v8
1729 1732
1730 1733
1731 #ifndef GOOGLE3 1734 #ifndef GOOGLE3
1732 int main(int argc, char* argv[]) { 1735 int main(int argc, char* argv[]) {
1733 return v8::Shell::Main(argc, argv); 1736 return v8::Shell::Main(argc, argv);
1734 } 1737 }
1735 #endif 1738 #endif
OLDNEW
« no previous file with comments | « include/v8-testing.h ('k') | src/defaults.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698