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

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

Issue 8114032: Clean list of external references from internal objects like the hole value. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/serialize.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-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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
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), 111 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty),
112 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty))); 112 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty)));
113 ExternalReference keyed_load_function_prototype = 113 ExternalReference keyed_load_function_prototype =
114 ExternalReference(isolate->counters()->keyed_load_function_prototype()); 114 ExternalReference(isolate->counters()->keyed_load_function_prototype());
115 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype), 115 CHECK_EQ(make_code(STATS_COUNTER, Counters::k_keyed_load_function_prototype),
116 encoder.Encode(keyed_load_function_prototype.address())); 116 encoder.Encode(keyed_load_function_prototype.address()));
117 ExternalReference the_hole_value_location =
118 ExternalReference::the_hole_value_location(isolate);
119 CHECK_EQ(make_code(UNCLASSIFIED, 2),
120 encoder.Encode(the_hole_value_location.address()));
121 ExternalReference stack_limit_address = 117 ExternalReference stack_limit_address =
122 ExternalReference::address_of_stack_limit(isolate); 118 ExternalReference::address_of_stack_limit(isolate);
123 CHECK_EQ(make_code(UNCLASSIFIED, 4), 119 CHECK_EQ(make_code(UNCLASSIFIED, 4),
124 encoder.Encode(stack_limit_address.address())); 120 encoder.Encode(stack_limit_address.address()));
125 ExternalReference real_stack_limit_address = 121 ExternalReference real_stack_limit_address =
126 ExternalReference::address_of_real_stack_limit(isolate); 122 ExternalReference::address_of_real_stack_limit(isolate);
127 CHECK_EQ(make_code(UNCLASSIFIED, 5), 123 CHECK_EQ(make_code(UNCLASSIFIED, 5),
128 encoder.Encode(real_stack_limit_address.address())); 124 encoder.Encode(real_stack_limit_address.address()));
129 #ifdef ENABLE_DEBUGGER_SUPPORT 125 #ifdef ENABLE_DEBUGGER_SUPPORT
130 CHECK_EQ(make_code(UNCLASSIFIED, 16), 126 CHECK_EQ(make_code(UNCLASSIFIED, 16),
(...skipping 19 matching lines...) Expand all
150 decoder.Decode(make_code(v8::internal::RUNTIME_FUNCTION, 146 decoder.Decode(make_code(v8::internal::RUNTIME_FUNCTION,
151 Runtime::kAbort))); 147 Runtime::kAbort)));
152 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)), 148 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)),
153 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty))); 149 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty)));
154 ExternalReference keyed_load_function = 150 ExternalReference keyed_load_function =
155 ExternalReference(isolate->counters()->keyed_load_function_prototype()); 151 ExternalReference(isolate->counters()->keyed_load_function_prototype());
156 CHECK_EQ(keyed_load_function.address(), 152 CHECK_EQ(keyed_load_function.address(),
157 decoder.Decode( 153 decoder.Decode(
158 make_code(STATS_COUNTER, 154 make_code(STATS_COUNTER,
159 Counters::k_keyed_load_function_prototype))); 155 Counters::k_keyed_load_function_prototype)));
160 CHECK_EQ(ExternalReference::the_hole_value_location(isolate).address(),
161 decoder.Decode(make_code(UNCLASSIFIED, 2)));
162 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(), 156 CHECK_EQ(ExternalReference::address_of_stack_limit(isolate).address(),
163 decoder.Decode(make_code(UNCLASSIFIED, 4))); 157 decoder.Decode(make_code(UNCLASSIFIED, 4)));
164 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(), 158 CHECK_EQ(ExternalReference::address_of_real_stack_limit(isolate).address(),
165 decoder.Decode(make_code(UNCLASSIFIED, 5))); 159 decoder.Decode(make_code(UNCLASSIFIED, 5)));
166 #ifdef ENABLE_DEBUGGER_SUPPORT 160 #ifdef ENABLE_DEBUGGER_SUPPORT
167 CHECK_EQ(ExternalReference::debug_break(isolate).address(), 161 CHECK_EQ(ExternalReference::debug_break(isolate).address(),
168 decoder.Decode(make_code(UNCLASSIFIED, 16))); 162 decoder.Decode(make_code(UNCLASSIFIED, 16)));
169 #endif // ENABLE_DEBUGGER_SUPPORT 163 #endif // ENABLE_DEBUGGER_SUPPORT
170 CHECK_EQ(ExternalReference::new_space_start(isolate).address(), 164 CHECK_EQ(ExternalReference::new_space_start(isolate).address(),
171 decoder.Decode(make_code(UNCLASSIFIED, 10))); 165 decoder.Decode(make_code(UNCLASSIFIED, 10)));
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 TEST(TestThatAlwaysFails) { 673 TEST(TestThatAlwaysFails) {
680 bool ArtificialFailure = false; 674 bool ArtificialFailure = false;
681 CHECK(ArtificialFailure); 675 CHECK(ArtificialFailure);
682 } 676 }
683 677
684 678
685 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { 679 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
686 bool ArtificialFailure2 = false; 680 bool ArtificialFailure2 = false;
687 CHECK(ArtificialFailure2); 681 CHECK(ArtificialFailure2);
688 } 682 }
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698