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

Side by Side Diff: test/cctest/test-api.cc

Issue 60085: Rewrote equality check in CompareStub to do quick pointer comparison first. (Closed)
Patch Set: Created 11 years, 8 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
« src/codegen-ia32.cc ('K') | « src/codegen-ia32.cc ('k') | 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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 ExpectObject("undetectable&&true", obj); 2380 ExpectObject("undetectable&&true", obj);
2381 ExpectObject("undetectable&&false", obj); 2381 ExpectObject("undetectable&&false", obj);
2382 ExpectBoolean("undetectable||true", true); 2382 ExpectBoolean("undetectable||true", true);
2383 ExpectBoolean("undetectable||false", false); 2383 ExpectBoolean("undetectable||false", false);
2384 2384
2385 ExpectBoolean("undetectable==null", true); 2385 ExpectBoolean("undetectable==null", true);
2386 ExpectBoolean("undetectable==undefined", true); 2386 ExpectBoolean("undetectable==undefined", true);
2387 ExpectBoolean("undetectable==undetectable", true); 2387 ExpectBoolean("undetectable==undetectable", true);
2388 2388
2389 ExpectBoolean("undetectable===null", false); 2389 ExpectBoolean("undetectable===null", false);
2390 ExpectBoolean("undetectable===undefined", true); 2390 ExpectBoolean("undetectable===undefined", false);
2391 ExpectBoolean("undetectable===undetectable", true); 2391 ExpectBoolean("undetectable===undetectable", true);
2392 } 2392 }
2393 2393
2394 2394
2395 THREADED_TEST(UndetectableString) { 2395 THREADED_TEST(UndetectableString) {
2396 v8::HandleScope scope; 2396 v8::HandleScope scope;
2397 LocalContext env; 2397 LocalContext env;
2398 2398
2399 Local<String> obj = String::NewUndetectable("foo"); 2399 Local<String> obj = String::NewUndetectable("foo");
2400 env->Global()->Set(v8_str("undetectable"), obj); 2400 env->Global()->Set(v8_str("undetectable"), obj);
(...skipping 14 matching lines...) Expand all
2415 ExpectObject("undetectable&&true", obj); 2415 ExpectObject("undetectable&&true", obj);
2416 ExpectObject("undetectable&&false", obj); 2416 ExpectObject("undetectable&&false", obj);
2417 ExpectBoolean("undetectable||true", true); 2417 ExpectBoolean("undetectable||true", true);
2418 ExpectBoolean("undetectable||false", false); 2418 ExpectBoolean("undetectable||false", false);
2419 2419
2420 ExpectBoolean("undetectable==null", true); 2420 ExpectBoolean("undetectable==null", true);
2421 ExpectBoolean("undetectable==undefined", true); 2421 ExpectBoolean("undetectable==undefined", true);
2422 ExpectBoolean("undetectable==undetectable", true); 2422 ExpectBoolean("undetectable==undetectable", true);
2423 2423
2424 ExpectBoolean("undetectable===null", false); 2424 ExpectBoolean("undetectable===null", false);
2425 ExpectBoolean("undetectable===undefined", true); 2425 ExpectBoolean("undetectable===undefined", false);
2426 ExpectBoolean("undetectable===undetectable", true); 2426 ExpectBoolean("undetectable===undetectable", true);
2427 } 2427 }
2428 2428
2429 2429
2430 template <typename T> static void USE(T) { } 2430 template <typename T> static void USE(T) { }
2431 2431
2432 2432
2433 // This test is not intended to be run, just type checked. 2433 // This test is not intended to be run, just type checked.
2434 static void PersistentHandles() { 2434 static void PersistentHandles() {
2435 USE(PersistentHandles); 2435 USE(PersistentHandles);
(...skipping 3693 matching lines...) Expand 10 before | Expand all | Expand 10 after
6129 // Check without 'eval' or 'with'. 6129 // Check without 'eval' or 'with'.
6130 v8::Handle<v8::Value> res = 6130 v8::Handle<v8::Value> res =
6131 CompileRun("function f() { x = 42; return x; }; f()"); 6131 CompileRun("function f() { x = 42; return x; }; f()");
6132 // Check with 'eval'. 6132 // Check with 'eval'.
6133 res = CompileRun("function f() { eval('1'); y = 42; return y; }; f()"); 6133 res = CompileRun("function f() { eval('1'); y = 42; return y; }; f()");
6134 CHECK_EQ(v8::Integer::New(42), res); 6134 CHECK_EQ(v8::Integer::New(42), res);
6135 // Check with 'with'. 6135 // Check with 'with'.
6136 res = CompileRun("function f() { with (this) { y = 42 }; return y; }; f()"); 6136 res = CompileRun("function f() { with (this) { y = 42 }; return y; }; f()");
6137 CHECK_EQ(v8::Integer::New(42), res); 6137 CHECK_EQ(v8::Integer::New(42), res);
6138 } 6138 }
OLDNEW
« src/codegen-ia32.cc ('K') | « src/codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698