OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // a1, respectively. | 84 // a1, respectively. |
85 __ CopyBytes(a0, a1, a2, a3); | 85 __ CopyBytes(a0, a1, a2, a3); |
86 __ li(a2, Operand(reinterpret_cast<int>(&a0_))); | 86 __ li(a2, Operand(reinterpret_cast<int>(&a0_))); |
87 __ li(a3, Operand(reinterpret_cast<int>(&a1_))); | 87 __ li(a3, Operand(reinterpret_cast<int>(&a1_))); |
88 __ sw(a0, MemOperand(a2)); | 88 __ sw(a0, MemOperand(a2)); |
89 __ jr(ra); | 89 __ jr(ra); |
90 __ sw(a1, MemOperand(a3)); | 90 __ sw(a1, MemOperand(a3)); |
91 | 91 |
92 CodeDesc desc; | 92 CodeDesc desc; |
93 masm->GetCode(&desc); | 93 masm->GetCode(&desc); |
94 Object* code = isolate->heap()->CreateCode( | 94 Handle<Code> code = isolate->factory()->NewCode( |
95 desc, | 95 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
96 Code::ComputeFlags(Code::STUB), | |
97 Handle<Code>())->ToObjectChecked(); | |
98 CHECK(code->IsCode()); | |
99 | 96 |
100 ::F f = FUNCTION_CAST< ::F>(Code::cast(code)->entry()); | 97 ::F f = FUNCTION_CAST< ::F>(code->entry()); |
101 | 98 |
102 // Initialise source data with non-zero bytes. | 99 // Initialise source data with non-zero bytes. |
103 for (int i = 0; i < data_size; i++) { | 100 for (int i = 0; i < data_size; i++) { |
104 src_buffer[i] = to_non_zero(i); | 101 src_buffer[i] = to_non_zero(i); |
105 } | 102 } |
106 | 103 |
107 const int fuzz = 11; | 104 const int fuzz = 11; |
108 | 105 |
109 for (int size = 0; size < 600; size++) { | 106 for (int size = 0; size < 600; size++) { |
110 for (const byte* src = src_buffer; src < src_buffer + fuzz; src++) { | 107 for (const byte* src = src_buffer; src < src_buffer + fuzz; src++) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 TestNaN( | 166 TestNaN( |
170 "var result;" | 167 "var result;" |
171 "for (var i = 0; i < 2; i++) {" | 168 "for (var i = 0; i < 2; i++) {" |
172 " result = [NaN];" | 169 " result = [NaN];" |
173 "}" | 170 "}" |
174 "result;"); | 171 "result;"); |
175 } | 172 } |
176 | 173 |
177 | 174 |
178 #undef __ | 175 #undef __ |
OLD | NEW |