OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 #endif | 106 #endif |
107 } | 107 } |
108 | 108 |
109 | 109 |
110 void check(uint32_t key) { | 110 void check(uint32_t key) { |
111 Isolate* isolate = CcTest::i_isolate(); | 111 Isolate* isolate = CcTest::i_isolate(); |
112 Factory* factory = isolate->factory(); | 112 Factory* factory = isolate->factory(); |
113 HandleScope scope(isolate); | 113 HandleScope scope(isolate); |
114 | 114 |
115 v8::internal::byte buffer[2048]; | 115 v8::internal::byte buffer[2048]; |
116 MacroAssembler masm(CcTest::i_isolate(), buffer, sizeof buffer); | 116 MacroAssembler masm(CcTest::i_isolate(), buffer, sizeof(buffer), |
| 117 v8::internal::CodeObjectRequired::kYes); |
117 | 118 |
118 generate(&masm, key); | 119 generate(&masm, key); |
119 | 120 |
120 CodeDesc desc; | 121 CodeDesc desc; |
121 masm.GetCode(&desc); | 122 masm.GetCode(&desc); |
122 Handle<Object> undefined(isolate->heap()->undefined_value(), isolate); | 123 Handle<Object> undefined(isolate->heap()->undefined_value(), isolate); |
123 Handle<Code> code = factory->NewCode(desc, | 124 Handle<Code> code = factory->NewCode(desc, |
124 Code::ComputeFlags(Code::STUB), | 125 Code::ComputeFlags(Code::STUB), |
125 undefined); | 126 undefined); |
126 CHECK(code->IsCode()); | 127 CHECK(code->IsCode()); |
(...skipping 29 matching lines...) Expand all Loading... |
156 // Some pseudo-random numbers | 157 // Some pseudo-random numbers |
157 static const uint32_t kLimit = 1000; | 158 static const uint32_t kLimit = 1000; |
158 for (uint32_t i = 0; i < 5; i++) { | 159 for (uint32_t i = 0; i < 5; i++) { |
159 for (uint32_t j = 0; j < 5; j++) { | 160 for (uint32_t j = 0; j < 5; j++) { |
160 check(PseudoRandom(i, j) % kLimit); | 161 check(PseudoRandom(i, j) % kLimit); |
161 } | 162 } |
162 } | 163 } |
163 } | 164 } |
164 | 165 |
165 #undef __ | 166 #undef __ |
OLD | NEW |