Revision: 14648
Author:   [email protected]
Date:     Mon May 13 09:32:32 2013
Log:      Enable harmony_typed_arrays for shared build of d8.

[email protected]

Review URL: https://codereview.chromium.org/14927014
http://code.google.com/p/v8/source/detail?r=14648

Modified:
 /branches/bleeding_edge/src/d8.cc

=======================================
--- /branches/bleeding_edge/src/d8.cc   Mon May 13 07:18:43 2013
+++ /branches/bleeding_edge/src/d8.cc   Mon May 13 09:32:32 2013
@@ -2165,6 +2165,19 @@
 #endif  // V8_SHARED
   return 0;
 }
+
+
+#ifdef V8_SHARED
+static void EnableHarmonyTypedArraysViaCommandLine() {
+  int fake_argc = 2;
+  char **fake_argv = new char*[2];
+  fake_argv[0] = NULL;
+  fake_argv[1] = strdup("--harmony-typed-arrays");
+  v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false);
+  free(fake_argv[1]);
+  delete[] fake_argv;
+}
+#endif


 int Shell::Main(int argc, char* argv[]) {
@@ -2172,6 +2185,8 @@
 #ifndef V8_SHARED
   i::FLAG_harmony_array_buffer = true;
   i::FLAG_harmony_typed_arrays = true;
+#else
+  EnableHarmonyTypedArraysViaCommandLine();
 #endif
   int result = 0;
   Isolate* isolate = Isolate::GetCurrent();

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to