| OLD | NEW |
| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 "deopt = true;" | 388 "deopt = true;" |
| 389 "var result = f('a+', new X());"); | 389 "var result = f('a+', new X());"); |
| 390 } | 390 } |
| 391 NonIncrementalGC(i_isolate); | 391 NonIncrementalGC(i_isolate); |
| 392 | 392 |
| 393 CHECK(!GetJSFunction(env->Global(), "f")->IsOptimized()); | 393 CHECK(!GetJSFunction(env->Global(), "f")->IsOptimized()); |
| 394 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); | 394 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); |
| 395 v8::Handle<v8::Value> result = env->Global()->Get(v8_str("result")); | 395 v8::Handle<v8::Value> result = env->Global()->Get(v8_str("result")); |
| 396 CHECK(result->IsString()); | 396 CHECK(result->IsString()); |
| 397 v8::String::Utf8Value utf8(result); | 397 v8::String::Utf8Value utf8(result); |
| 398 CHECK_EQ("a+an X", *utf8); | 398 CHECK_EQ(0, strcmp("a+an X", *utf8)); |
| 399 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(i_isolate)); | 399 CHECK_EQ(0, Deoptimizer::GetDeoptimizedCodeCount(i_isolate)); |
| 400 } | 400 } |
| 401 isolate->Exit(); | 401 isolate->Exit(); |
| 402 isolate->Dispose(); | 402 isolate->Dispose(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 | 405 |
| 406 static void CompileConstructorWithDeoptimizingValueOf() { | 406 static void CompileConstructorWithDeoptimizingValueOf() { |
| 407 CompileRun("var count = 0;" | 407 CompileRun("var count = 0;" |
| 408 "var result = 0;" | 408 "var result = 0;" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); | 782 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); |
| 783 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); | 783 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); |
| 784 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); | 784 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); |
| 785 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); | 785 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); |
| 786 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); | 786 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); |
| 787 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); | 787 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); |
| 788 } | 788 } |
| 789 isolate->Exit(); | 789 isolate->Exit(); |
| 790 isolate->Dispose(); | 790 isolate->Dispose(); |
| 791 } | 791 } |
| OLD | NEW |