| 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 2769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2780 v8::Local<v8::Value> sym_val = sym2; | 2780 v8::Local<v8::Value> sym_val = sym2; |
| 2781 CHECK(sym_val->IsSymbol()); | 2781 CHECK(sym_val->IsSymbol()); |
| 2782 CHECK(sym_val->Equals(sym2)); | 2782 CHECK(sym_val->Equals(sym2)); |
| 2783 CHECK(sym_val->StrictEquals(sym2)); | 2783 CHECK(sym_val->StrictEquals(sym2)); |
| 2784 CHECK(v8::Symbol::Cast(*sym_val)->Equals(sym2)); | 2784 CHECK(v8::Symbol::Cast(*sym_val)->Equals(sym2)); |
| 2785 | 2785 |
| 2786 v8::Local<v8::Value> sym_obj = v8::SymbolObject::New(isolate, sym2); | 2786 v8::Local<v8::Value> sym_obj = v8::SymbolObject::New(isolate, sym2); |
| 2787 CHECK(sym_obj->IsSymbolObject()); | 2787 CHECK(sym_obj->IsSymbolObject()); |
| 2788 CHECK(!sym2->IsSymbolObject()); | 2788 CHECK(!sym2->IsSymbolObject()); |
| 2789 CHECK(!obj->IsSymbolObject()); | 2789 CHECK(!obj->IsSymbolObject()); |
| 2790 CHECK(sym_obj->Equals(sym2)); | 2790 CHECK(!sym_obj->Equals(sym2)); |
| 2791 CHECK(!sym_obj->StrictEquals(sym2)); | 2791 CHECK(!sym_obj->StrictEquals(sym2)); |
| 2792 CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj)); | 2792 CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj)); |
| 2793 CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2)); | 2793 CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2)); |
| 2794 | 2794 |
| 2795 // Make sure delete of a non-existent symbol property works. | 2795 // Make sure delete of a non-existent symbol property works. |
| 2796 CHECK(obj->Delete(sym1)); | 2796 CHECK(obj->Delete(sym1)); |
| 2797 CHECK(!obj->Has(sym1)); | 2797 CHECK(!obj->Has(sym1)); |
| 2798 | 2798 |
| 2799 CHECK(obj->Set(sym1, v8::Integer::New(isolate, 1503))); | 2799 CHECK(obj->Set(sym1, v8::Integer::New(isolate, 1503))); |
| 2800 CHECK(obj->Has(sym1)); | 2800 CHECK(obj->Has(sym1)); |
| (...skipping 19176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21977 | 21977 |
| 21978 | 21978 |
| 21979 TEST(TestFunctionCallOptimization) { | 21979 TEST(TestFunctionCallOptimization) { |
| 21980 i::FLAG_allow_natives_syntax = true; | 21980 i::FLAG_allow_natives_syntax = true; |
| 21981 ApiCallOptimizationChecker checker; | 21981 ApiCallOptimizationChecker checker; |
| 21982 checker.Run(true, true); | 21982 checker.Run(true, true); |
| 21983 checker.Run(false, true); | 21983 checker.Run(false, true); |
| 21984 checker.Run(true, false); | 21984 checker.Run(true, false); |
| 21985 checker.Run(false, false); | 21985 checker.Run(false, false); |
| 21986 } | 21986 } |
| OLD | NEW |