| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 TEST(ExternalReferenceEncoder) { | 101 TEST(ExternalReferenceEncoder) { |
| 102 Isolate* isolate = i::Isolate::Current(); | 102 Isolate* isolate = i::Isolate::Current(); |
| 103 isolate->stats_table()->SetCounterFunction(counter_function); | 103 isolate->stats_table()->SetCounterFunction(counter_function); |
| 104 v8::V8::Initialize(); | 104 v8::V8::Initialize(); |
| 105 | 105 |
| 106 ExternalReferenceEncoder encoder; | 106 ExternalReferenceEncoder encoder; |
| 107 CHECK_EQ(make_code(BUILTIN, Builtins::kArrayCode), | 107 CHECK_EQ(make_code(BUILTIN, Builtins::kArrayCode), |
| 108 Encode(encoder, Builtins::kArrayCode)); | 108 Encode(encoder, Builtins::kArrayCode)); |
| 109 CHECK_EQ(make_code(v8::internal::RUNTIME_FUNCTION, Runtime::kAbort), | 109 CHECK_EQ(make_code(v8::internal::RUNTIME_FUNCTION, Runtime::kAbort), |
| 110 Encode(encoder, Runtime::kAbort)); | 110 Encode(encoder, Runtime::kAbort)); |
| 111 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty), | |
| 112 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty))); | |
| 113 ExternalReference keyed_load_function_prototype = | 111 ExternalReference keyed_load_function_prototype = |
| 114 ExternalReference(isolate->counters()->keyed_load_function_prototype()); | 112 ExternalReference(isolate->counters()->keyed_load_function_prototype()); |
| 115 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype), | 113 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype), |
| 116 encoder.Encode(keyed_load_function_prototype.address())); | 114 encoder.Encode(keyed_load_function_prototype.address())); |
| 117 ExternalReference stack_limit_address = | 115 ExternalReference stack_limit_address = |
| 118 ExternalReference::address_of_stack_limit(isolate); | 116 ExternalReference::address_of_stack_limit(isolate); |
| 119 CHECK_EQ(make_code(UNCLASSIFIED, 4), | 117 CHECK_EQ(make_code(UNCLASSIFIED, 4), |
| 120 encoder.Encode(stack_limit_address.address())); | 118 encoder.Encode(stack_limit_address.address())); |
| 121 ExternalReference real_stack_limit_address = | 119 ExternalReference real_stack_limit_address = |
| 122 ExternalReference::address_of_real_stack_limit(isolate); | 120 ExternalReference::address_of_real_stack_limit(isolate); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 141 Isolate* isolate = i::Isolate::Current(); | 139 Isolate* isolate = i::Isolate::Current(); |
| 142 isolate->stats_table()->SetCounterFunction(counter_function); | 140 isolate->stats_table()->SetCounterFunction(counter_function); |
| 143 v8::V8::Initialize(); | 141 v8::V8::Initialize(); |
| 144 | 142 |
| 145 ExternalReferenceDecoder decoder; | 143 ExternalReferenceDecoder decoder; |
| 146 CHECK_EQ(AddressOf(Builtins::kArrayCode), | 144 CHECK_EQ(AddressOf(Builtins::kArrayCode), |
| 147 decoder.Decode(make_code(BUILTIN, Builtins::kArrayCode))); | 145 decoder.Decode(make_code(BUILTIN, Builtins::kArrayCode))); |
| 148 CHECK_EQ(AddressOf(Runtime::kAbort), | 146 CHECK_EQ(AddressOf(Runtime::kAbort), |
| 149 decoder.Decode(make_code(v8::internal::RUNTIME_FUNCTION, | 147 decoder.Decode(make_code(v8::internal::RUNTIME_FUNCTION, |
| 150 Runtime::kAbort))); | 148 Runtime::kAbort))); |
| 151 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)), | |
| 152 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty))); | |
| 153 ExternalReference keyed_load_function = | 149 ExternalReference keyed_load_function = |
| 154 ExternalReference(isolate->counters()->keyed_load_function_prototype()); | 150 ExternalReference(isolate->counters()->keyed_load_function_prototype()); |
| 155 CHECK_EQ(keyed_load_function.address(), | 151 CHECK_EQ(keyed_load_function.address(), |
| 156 decoder.Decode( | 152 decoder.Decode( |
| 157 make_code(STATS_COUNTER, | 153 make_code(STATS_COUNTER, |
| 158 Counters::k_keyed_load_function_prototype))); | 154 Counters::k_keyed_load_function_prototype))); |
| 159 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(), | 155 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(), |
| 160 decoder.Decode(make_code(UNCLASSIFIED, 4))); | 156 decoder.Decode(make_code(UNCLASSIFIED, 4))); |
| 161 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(), | 157 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(), |
| 162 decoder.Decode(make_code(UNCLASSIFIED, 5))); | 158 decoder.Decode(make_code(UNCLASSIFIED, 5))); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 TEST(TestThatAlwaysFails) { | 591 TEST(TestThatAlwaysFails) { |
| 596 bool ArtificialFailure = false; | 592 bool ArtificialFailure = false; |
| 597 CHECK(ArtificialFailure); | 593 CHECK(ArtificialFailure); |
| 598 } | 594 } |
| 599 | 595 |
| 600 | 596 |
| 601 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { | 597 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { |
| 602 bool ArtificialFailure2 = false; | 598 bool ArtificialFailure2 = false; |
| 603 CHECK(ArtificialFailure2); | 599 CHECK(ArtificialFailure2); |
| 604 } | 600 } |
| OLD | NEW |