| OLD | NEW |
| 1 // Copyright 2007-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2010 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 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache); | 1477 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache); |
| 1478 } | 1478 } |
| 1479 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run(); | 1479 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run(); |
| 1480 CHECK(result->ToString(isolate2)->Equals(v8_str("XY"))); | 1480 CHECK(result->ToString(isolate2)->Equals(v8_str("XY"))); |
| 1481 } | 1481 } |
| 1482 isolate2->Dispose(); | 1482 isolate2->Dispose(); |
| 1483 } | 1483 } |
| 1484 | 1484 |
| 1485 | 1485 |
| 1486 TEST(SerializeInternalReference) { | 1486 TEST(SerializeInternalReference) { |
| 1487 #ifdef V8_TARGET_ARCH_ARM64 | 1487 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 |
| 1488 return; | 1488 return; |
| 1489 #endif // V8_TARGET_ARCH_ARM64 | 1489 #endif |
| 1490 // Disable experimental natives that are loaded after deserialization. | 1490 // Disable experimental natives that are loaded after deserialization. |
| 1491 FLAG_turbo_deoptimization = false; | 1491 FLAG_turbo_deoptimization = false; |
| 1492 FLAG_context_specialization = false; | 1492 FLAG_context_specialization = false; |
| 1493 FLAG_always_opt = true; | 1493 FLAG_always_opt = true; |
| 1494 const char* flag = "--turbo-filter=foo"; | 1494 const char* flag = "--turbo-filter=foo"; |
| 1495 FlagList::SetFlagsFromString(flag, StrLength(flag)); | 1495 FlagList::SetFlagsFromString(flag, StrLength(flag)); |
| 1496 | 1496 |
| 1497 const char* source = | 1497 const char* source = |
| 1498 "var foo = (function(stdlib, foreign, heap) {" | 1498 "var foo = (function(stdlib, foreign, heap) {" |
| 1499 " function foo(i) {" | 1499 " function foo(i) {" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 CHECK_EQ(11, CompileRun("foo(0)")->ToInt32(isolate)->Int32Value()); | 1542 CHECK_EQ(11, CompileRun("foo(0)")->ToInt32(isolate)->Int32Value()); |
| 1543 CHECK_EQ(11, CompileRun("foo(1)")->ToInt32(isolate)->Int32Value()); | 1543 CHECK_EQ(11, CompileRun("foo(1)")->ToInt32(isolate)->Int32Value()); |
| 1544 CHECK_EQ(12, CompileRun("foo(2)")->ToInt32(isolate)->Int32Value()); | 1544 CHECK_EQ(12, CompileRun("foo(2)")->ToInt32(isolate)->Int32Value()); |
| 1545 CHECK_EQ(12, CompileRun("foo(3)")->ToInt32(isolate)->Int32Value()); | 1545 CHECK_EQ(12, CompileRun("foo(3)")->ToInt32(isolate)->Int32Value()); |
| 1546 CHECK_EQ(23, CompileRun("foo(4)")->ToInt32(isolate)->Int32Value()); | 1546 CHECK_EQ(23, CompileRun("foo(4)")->ToInt32(isolate)->Int32Value()); |
| 1547 CHECK_EQ(23, CompileRun("foo(5)")->ToInt32(isolate)->Int32Value()); | 1547 CHECK_EQ(23, CompileRun("foo(5)")->ToInt32(isolate)->Int32Value()); |
| 1548 CHECK_EQ(10, CompileRun("foo(6)")->ToInt32(isolate)->Int32Value()); | 1548 CHECK_EQ(10, CompileRun("foo(6)")->ToInt32(isolate)->Int32Value()); |
| 1549 } | 1549 } |
| 1550 isolate->Dispose(); | 1550 isolate->Dispose(); |
| 1551 } | 1551 } |
| OLD | NEW |