Commit 5777f3fb authored by dslomov@chromium.org's avatar dslomov@chromium.org

Enable native implementation of array buffer and typed arrays in d8 and tests.

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15059009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b774c3ed
......@@ -2169,6 +2169,10 @@ int Shell::RunMain(Isolate* isolate, int argc, char* argv[]) {
int Shell::Main(int argc, char* argv[]) {
if (!SetOptions(argc, argv)) return 1;
#ifndef V8_SHARED
i::FLAG_harmony_array_buffer = true;
i::FLAG_harmony_typed_arrays = true;
#endif
int result = 0;
Isolate* isolate = Isolate::GetCurrent();
DumbLineEditor dumb_line_editor(isolate);
......
......@@ -98,6 +98,8 @@ v8::Isolate* CcTest::default_isolate_;
int main(int argc, char* argv[]) {
v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
v8::internal::FLAG_harmony_array_buffer = true;
v8::internal::FLAG_harmony_typed_arrays = true;
CcTest::set_default_isolate(v8::Isolate::GetCurrent());
CHECK(CcTest::default_isolate() != NULL);
int tests_run = 0;
......
......@@ -12081,6 +12081,13 @@ static void RunLoopInNewEnv() {
TEST(SetFunctionEntryHook) {
// FunctionEntryHook does not work well with experimental natives.
// Experimental natives are compiled during snapshot deserialization.
// This test breaks because InstallGetter (function from snapshot that
// only gets called from experimental natives) is compiled with entry hooks.
i::FLAG_harmony_typed_arrays = false;
i::FLAG_harmony_array_buffer = false;
i::FLAG_allow_natives_syntax = true;
i::FLAG_use_inlining = false;
......
......@@ -2805,8 +2805,16 @@ TEST(Regress169209) {
i::FLAG_stress_compaction = false;
i::FLAG_allow_natives_syntax = true;
i::FLAG_flush_code_incrementally = true;
// Experimental natives are compiled during snapshot deserialization.
// This test breaks because heap layout changes in a way that closure
// is visited before shared function info.
i::FLAG_harmony_typed_arrays = false;
i::FLAG_harmony_array_buffer = false;
CcTest::InitializeVM();
Isolate* isolate = Isolate::Current();
// Force experimental natives to compile to normalize heap layout.
Heap* heap = isolate->heap();
HandleScope scope(isolate);
......
......@@ -60,7 +60,7 @@ for (i = 0; i < scripts.length; i++) {
}
// This has to be updated if the number of native scripts change.
assertEquals(14, named_native_count);
assertEquals(16, named_native_count);
// If no snapshot is used, only the 'gc' extension is loaded.
// If snapshot is used, all extensions are cached in the snapshot.
assertTrue(extension_count == 1 || extension_count == 5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment