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

Side by Side Diff: src/d8.cc

Issue 14927014: Enable harmony_typed_arrays for shared build of d8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « no previous file | 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 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 delete thread; 2158 delete thread;
2159 } 2159 }
2160 2160
2161 if (threads.length() > 0 && options.use_preemption) { 2161 if (threads.length() > 0 && options.use_preemption) {
2162 Locker lock(isolate); 2162 Locker lock(isolate);
2163 Locker::StopPreemption(); 2163 Locker::StopPreemption();
2164 } 2164 }
2165 #endif // V8_SHARED 2165 #endif // V8_SHARED
2166 return 0; 2166 return 0;
2167 } 2167 }
2168 2168
Michael Starzinger 2013/05/13 16:27:35 nit: Add a second empty newline.
2169 #ifdef V8_SHARED
2170 static void EnableHarmonyTypedArraysViaCommandLine() {
2171 int fake_argc = 2;
2172 char **fake_argv = new char*[2];
2173 fake_argv[0] = NULL;
2174 fake_argv[1] = strdup("--harmony-typed-arrays");
2175 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false);
2176 free(fake_argv[1]);
2177 delete[] fake_argv;
2178 }
2179 #endif
2180
2169 2181
2170 int Shell::Main(int argc, char* argv[]) { 2182 int Shell::Main(int argc, char* argv[]) {
2171 if (!SetOptions(argc, argv)) return 1; 2183 if (!SetOptions(argc, argv)) return 1;
2172 #ifndef V8_SHARED 2184 #ifndef V8_SHARED
2173 i::FLAG_harmony_array_buffer = true; 2185 i::FLAG_harmony_array_buffer = true;
2174 i::FLAG_harmony_typed_arrays = true; 2186 i::FLAG_harmony_typed_arrays = true;
2187 #else
2188 EnableHarmonyTypedArraysViaCommandLine();
2175 #endif 2189 #endif
2176 int result = 0; 2190 int result = 0;
2177 Isolate* isolate = Isolate::GetCurrent(); 2191 Isolate* isolate = Isolate::GetCurrent();
2178 DumbLineEditor dumb_line_editor(isolate); 2192 DumbLineEditor dumb_line_editor(isolate);
2179 { 2193 {
2180 Initialize(isolate); 2194 Initialize(isolate);
2181 #ifdef ENABLE_VTUNE_JIT_INTERFACE 2195 #ifdef ENABLE_VTUNE_JIT_INTERFACE
2182 vTune::InitializeVtuneForV8(); 2196 vTune::InitializeVtuneForV8();
2183 #endif 2197 #endif
2184 PerIsolateData data(isolate); 2198 PerIsolateData data(isolate);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 } 2255 }
2242 2256
2243 } // namespace v8 2257 } // namespace v8
2244 2258
2245 2259
2246 #ifndef GOOGLE3 2260 #ifndef GOOGLE3
2247 int main(int argc, char* argv[]) { 2261 int main(int argc, char* argv[]) {
2248 return v8::Shell::Main(argc, argv); 2262 return v8::Shell::Main(argc, argv);
2249 } 2263 }
2250 #endif 2264 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698