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

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

Issue 2807031: [Isolates] RegExpStack and memory allocation limits (statics #6) (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: -> is different than . Created 10 years, 5 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 | « test/cctest/test-platform-linux.cc ('k') | test/cctest/test-spaces.cc » ('j') | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 100
101 #ifdef ENABLE_DEBUGGER_SUPPORT 101 #ifdef ENABLE_DEBUGGER_SUPPORT
102 static int register_code(int reg) { 102 static int register_code(int reg) {
103 return Debug::k_register_address << kDebugIdShift | reg; 103 return Debug::k_register_address << kDebugIdShift | reg;
104 } 104 }
105 #endif // ENABLE_DEBUGGER_SUPPORT 105 #endif // ENABLE_DEBUGGER_SUPPORT
106 106
107 107
108 TEST(ExternalReferenceEncoder) { 108 TEST(ExternalReferenceEncoder) {
109 OS::Setup();
109 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function); 110 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function);
110 HEAP->Setup(false); 111 HEAP->Setup(false);
111 ExternalReferenceEncoder encoder; 112 ExternalReferenceEncoder encoder;
112 CHECK_EQ(make_code(BUILTIN, Builtins::ArrayCode), 113 CHECK_EQ(make_code(BUILTIN, Builtins::ArrayCode),
113 Encode(encoder, Builtins::ArrayCode)); 114 Encode(encoder, Builtins::ArrayCode));
114 CHECK_EQ(make_code(RUNTIME_FUNCTION, Runtime::kAbort), 115 CHECK_EQ(make_code(RUNTIME_FUNCTION, Runtime::kAbort),
115 Encode(encoder, Runtime::kAbort)); 116 Encode(encoder, Runtime::kAbort));
116 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty), 117 CHECK_EQ(make_code(IC_UTILITY, IC::kLoadCallbackProperty),
117 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty))); 118 Encode(encoder, IC_Utility(IC::kLoadCallbackProperty)));
118 #ifdef ENABLE_DEBUGGER_SUPPORT 119 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 21 matching lines...) Expand all
140 encoder.Encode(ExternalReference::debug_break().address())); 141 encoder.Encode(ExternalReference::debug_break().address()));
141 #endif // ENABLE_DEBUGGER_SUPPORT 142 #endif // ENABLE_DEBUGGER_SUPPORT
142 CHECK_EQ(make_code(UNCLASSIFIED, 10), 143 CHECK_EQ(make_code(UNCLASSIFIED, 10),
143 encoder.Encode(ExternalReference::new_space_start().address())); 144 encoder.Encode(ExternalReference::new_space_start().address()));
144 CHECK_EQ(make_code(UNCLASSIFIED, 3), 145 CHECK_EQ(make_code(UNCLASSIFIED, 3),
145 encoder.Encode(ExternalReference::roots_address().address())); 146 encoder.Encode(ExternalReference::roots_address().address()));
146 } 147 }
147 148
148 149
149 TEST(ExternalReferenceDecoder) { 150 TEST(ExternalReferenceDecoder) {
151 OS::Setup();
150 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function); 152 i::Isolate::Current()->stats_table()->SetCounterFunction(counter_function);
151 HEAP->Setup(false); 153 HEAP->Setup(false);
152 ExternalReferenceDecoder decoder; 154 ExternalReferenceDecoder decoder;
153 CHECK_EQ(AddressOf(Builtins::ArrayCode), 155 CHECK_EQ(AddressOf(Builtins::ArrayCode),
154 decoder.Decode(make_code(BUILTIN, Builtins::ArrayCode))); 156 decoder.Decode(make_code(BUILTIN, Builtins::ArrayCode)));
155 CHECK_EQ(AddressOf(Runtime::kAbort), 157 CHECK_EQ(AddressOf(Runtime::kAbort),
156 decoder.Decode(make_code(RUNTIME_FUNCTION, Runtime::kAbort))); 158 decoder.Decode(make_code(RUNTIME_FUNCTION, Runtime::kAbort)));
157 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)), 159 CHECK_EQ(AddressOf(IC_Utility(IC::kLoadCallbackProperty)),
158 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty))); 160 decoder.Decode(make_code(IC_UTILITY, IC::kLoadCallbackProperty)));
159 #ifdef ENABLE_DEBUGGER_SUPPORT 161 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 TEST(TestThatAlwaysFails) { 671 TEST(TestThatAlwaysFails) {
670 bool ArtificialFailure = false; 672 bool ArtificialFailure = false;
671 CHECK(ArtificialFailure); 673 CHECK(ArtificialFailure);
672 } 674 }
673 675
674 676
675 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) { 677 DEPENDENT_TEST(DependentTestThatAlwaysFails, TestThatAlwaysSucceeds) {
676 bool ArtificialFailure2 = false; 678 bool ArtificialFailure2 = false;
677 CHECK(ArtificialFailure2); 679 CHECK(ArtificialFailure2);
678 } 680 }
OLDNEW
« no previous file with comments | « test/cctest/test-platform-linux.cc ('k') | test/cctest/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698