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

Side by Side Diff: src/d8.cc

Issue 24269003: Add methods to enable configuration of ResourceConstraints based on limits derived at runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: /s/uintptr_t/uint64_t 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 | « 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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 1643
1642 1644
1643 int Shell::Main(int argc, char* argv[]) { 1645 int Shell::Main(int argc, char* argv[]) {
1644 if (!SetOptions(argc, argv)) return 1; 1646 if (!SetOptions(argc, argv)) return 1;
1645 v8::V8::InitializeICU(); 1647 v8::V8::InitializeICU();
1646 #ifndef V8_SHARED 1648 #ifndef V8_SHARED
1647 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; 1649 i::FLAG_trace_hydrogen_file = "hydrogen.cfg";
1648 #else 1650 #else
1649 SetStandaloneFlagsViaCommandLine(); 1651 SetStandaloneFlagsViaCommandLine();
1650 #endif 1652 #endif
1653 v8::SetDefaultResourceConstraintsForCurrentPlatform();
1651 ShellArrayBufferAllocator array_buffer_allocator; 1654 ShellArrayBufferAllocator array_buffer_allocator;
1652 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); 1655 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
1653 int result = 0; 1656 int result = 0;
1654 Isolate* isolate = Isolate::GetCurrent(); 1657 Isolate* isolate = Isolate::GetCurrent();
1655 DumbLineEditor dumb_line_editor(isolate); 1658 DumbLineEditor dumb_line_editor(isolate);
1656 { 1659 {
1657 Initialize(isolate); 1660 Initialize(isolate);
1658 #ifdef ENABLE_VTUNE_JIT_INTERFACE 1661 #ifdef ENABLE_VTUNE_JIT_INTERFACE
1659 vTune::InitializeVtuneForV8(); 1662 vTune::InitializeVtuneForV8();
1660 #endif 1663 #endif
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 } 1728 }
1726 1729
1727 } // namespace v8 1730 } // namespace v8
1728 1731
1729 1732
1730 #ifndef GOOGLE3 1733 #ifndef GOOGLE3
1731 int main(int argc, char* argv[]) { 1734 int main(int argc, char* argv[]) {
1732 return v8::Shell::Main(argc, argv); 1735 return v8::Shell::Main(argc, argv);
1733 } 1736 }
1734 #endif 1737 #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