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

Side by Side Diff: src/d8.cc

Issue 18860007: Move InitializeICU() to the V8 API and use it. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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') | src/d8.gyp » ('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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #ifndef V8_SHARED 61 #ifndef V8_SHARED
62 #include "api.h" 62 #include "api.h"
63 #include "checks.h" 63 #include "checks.h"
64 #include "d8-debug.h" 64 #include "d8-debug.h"
65 #include "debug.h" 65 #include "debug.h"
66 #include "natives.h" 66 #include "natives.h"
67 #include "platform.h" 67 #include "platform.h"
68 #include "v8.h" 68 #include "v8.h"
69 #endif // V8_SHARED 69 #endif // V8_SHARED
70 70
71 #if defined(V8_I18N_SUPPORT)
72 #include "icu_util.h"
73 #endif
74
75 #if !defined(_WIN32) && !defined(_WIN64) 71 #if !defined(_WIN32) && !defined(_WIN64)
76 #include <unistd.h> // NOLINT 72 #include <unistd.h> // NOLINT
77 #endif 73 #endif
78 74
79 #ifndef ASSERT 75 #ifndef ASSERT
80 #define ASSERT(condition) assert(condition) 76 #define ASSERT(condition) assert(condition)
81 #endif 77 #endif
82 78
83 namespace v8 { 79 namespace v8 {
84 80
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 1575
1580 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { 1576 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
1581 public: 1577 public:
1582 virtual void* Allocate(size_t length) { return malloc(length); } 1578 virtual void* Allocate(size_t length) { return malloc(length); }
1583 virtual void Free(void* data) { free(data); } 1579 virtual void Free(void* data) { free(data); }
1584 }; 1580 };
1585 1581
1586 1582
1587 int Shell::Main(int argc, char* argv[]) { 1583 int Shell::Main(int argc, char* argv[]) {
1588 if (!SetOptions(argc, argv)) return 1; 1584 if (!SetOptions(argc, argv)) return 1;
1589 #if defined(V8_I18N_SUPPORT) 1585 v8::V8::InitializeICU();
1590 InitializeICU();
1591 #endif
1592 #ifndef V8_SHARED 1586 #ifndef V8_SHARED
1593 i::FLAG_harmony_array_buffer = true; 1587 i::FLAG_harmony_array_buffer = true;
1594 i::FLAG_harmony_typed_arrays = true; 1588 i::FLAG_harmony_typed_arrays = true;
1595 #else 1589 #else
1596 EnableHarmonyTypedArraysViaCommandLine(); 1590 EnableHarmonyTypedArraysViaCommandLine();
1597 #endif 1591 #endif
1598 ShellArrayBufferAllocator array_buffer_allocator; 1592 ShellArrayBufferAllocator array_buffer_allocator;
1599 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); 1593 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
1600 int result = 0; 1594 int result = 0;
1601 Isolate* isolate = Isolate::GetCurrent(); 1595 Isolate* isolate = Isolate::GetCurrent();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 } 1659 }
1666 1660
1667 } // namespace v8 1661 } // namespace v8
1668 1662
1669 1663
1670 #ifndef GOOGLE3 1664 #ifndef GOOGLE3
1671 int main(int argc, char* argv[]) { 1665 int main(int argc, char* argv[]) {
1672 return v8::Shell::Main(argc, argv); 1666 return v8::Shell::Main(argc, argv);
1673 } 1667 }
1674 #endif 1668 #endif
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/d8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698