| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 | 100 |
| 101 TEST(ExternalReferenceEncoder) { | 101 TEST(ExternalReferenceEncoder) { |
| 102 OS::Setup(); | 102 OS::Setup(); |
| 103 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function); | 103 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function); |
| 104 HEAP->Setup(false); | 104 HEAP->Setup(false); |
| 105 ExternalReferenceEncoder encoder; | 105 ExternalReferenceEncoder encoder; |
| 106 CHECK_EQ(make_code(BUILTIN, Builtins::ArrayCode), | 106 CHECK_EQ(make_code(BUILTIN, Builtins::ArrayCode), |
| 107 Encode(encoder, Builtins::ArrayCode)); | 107 Encode(encoder, Builtins::ArrayCode)); |
| 108 CHECK_EQ(make_code(RUNTIME_FUNCTION, Runtime::kAbort), | 108 CHECK_EQ(make_code(v8::internal::RUNTIME_FUNCTION, Runtime::kAbort), |
| 109 Encode(encoder, Runtime::kAbort)); | 109 Encode(encoder, Runtime::kAbort)); |
| 110 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty), | 110 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty), |
| 111 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty))); | 111 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty))); |
| 112 ExternalReference keyed_load_function_prototype = | 112 ExternalReference keyed_load_function_prototype = |
| 113 ExternalReference(COUNTERS->keyed_load_function_prototype()); | 113 ExternalReference(COUNTERS->keyed_load_function_prototype()); |
| 114 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype), | 114 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype), |
| 115 encoder.Encode(keyed_load_function_prototype.address())); | 115 encoder.Encode(keyed_load_function_prototype.address())); |
| 116 ExternalReference the_hole_value_location = | 116 ExternalReference the_hole_value_location = |
| 117 ExternalReference::the_hole_value_location(); | 117 ExternalReference::the_hole_value_location(); |
| 118 CHECK_EQ(make_code(UNCLASSIFIED, 2), | 118 CHECK_EQ(make_code(UNCLASSIFIED, 2), |
| (...skipping 18 matching lines...) Expand all Loading... |
| 137 | 137 |
| 138 | 138 |
| 139 TEST(ExternalReferenceDecoder) { | 139 TEST(ExternalReferenceDecoder) { |
| 140 OS::Setup(); | 140 OS::Setup(); |
| 141 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function); | 141 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function); |
| 142 HEAP->Setup(false); | 142 HEAP->Setup(false); |
| 143 ExternalReferenceDecoder decoder; | 143 ExternalReferenceDecoder decoder; |
| 144 CHECK_EQ(AddressOf(Builtins::ArrayCode), | 144 CHECK_EQ(AddressOf(Builtins::ArrayCode), |
| 145 decoder.Decode(make_code(BUILTIN, Builtins::ArrayCode))); | 145 decoder.Decode(make_code(BUILTIN, Builtins::ArrayCode))); |
| 146 CHECK_EQ(AddressOf(Runtime::kAbort), | 146 CHECK_EQ(AddressOf(Runtime::kAbort), |
| 147 decoder.Decode(make_code(RUNTIME_FUNCTION, Runtime::kAbort))); | 147 decoder.Decode(make_code(v8::internal::RUNTIME_FUNCTION, |
| 148 Runtime::kAbort))); |
| 148 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)), | 149 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)), |
| 149 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty))); | 150 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty))); |
| 150 ExternalReference keyed_load_function = | 151 ExternalReference keyed_load_function = |
| 151 ExternalReference(COUNTERS->keyed_load_function_prototype()); | 152 ExternalReference(COUNTERS->keyed_load_function_prototype()); |
| 152 CHECK_EQ(keyed_load_function.address(), | 153 CHECK_EQ(keyed_load_function.address(), |
| 153 decoder.Decode( | 154 decoder.Decode( |
| 154 make_code(STATS_COUNTER, | 155 make_code(STATS_COUNTER, |
| 155 Counters::k_keyed_load_function_prototype))); | 156 Counters::k_keyed_load_function_prototype))); |
| 156 CHECK_EQ(ExternalReference::the_hole_value_location().address(), | 157 CHECK_EQ(ExternalReference::the_hole_value_location().address(), |
| 157 decoder.Decode(make_code(UNCLASSIFIED, 2))); | 158 decoder.Decode(make_code(UNCLASSIFIED, 2))); |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 TEST(TestThatAlwaysFails) { | 667 TEST(TestThatAlwaysFails) { |
| 667 bool ArtificialFailure = false; | 668 bool ArtificialFailure = false; |
| 668 CHECK(ArtificialFailure); | 669 CHECK(ArtificialFailure); |
| 669 } | 670 } |
| 670 | 671 |
| 671 | 672 |
| 672 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 673 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
| 673 bool ArtificialFailure2 = false; | 674 bool ArtificialFailure2 = false; |
| 674 CHECK(ArtificialFailure2); | 675 CHECK(ArtificialFailure2); |
| 675 } | 676 } |
| OLD | NEW |