| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 TEST(CopyBytes) { | 61 TEST(CopyBytes) { |
| 62 CcTest::InitializeVM(); | 62 CcTest::InitializeVM(); |
| 63 Isolate* isolate = Isolate::Current(); | 63 Isolate* isolate = Isolate::Current(); |
| 64 HandleScope handles(isolate); | 64 HandleScope handles(isolate); |
| 65 | 65 |
| 66 const int data_size = 1 * KB; | 66 const int data_size = 1 * KB; |
| 67 size_t act_size; | 67 size_t act_size; |
| 68 | 68 |
| 69 // Allocate two blocks to copy data between. | 69 // Allocate two blocks to copy data between. |
| 70 byte* src_buffer = static_cast<byte*>(OS::Allocate(data_size, &act_size, 0)); | 70 byte* src_buffer = |
| 71 static_cast<byte*>(v8::base::OS::Allocate(data_size, &act_size, 0)); |
| 71 CHECK(src_buffer); | 72 CHECK(src_buffer); |
| 72 CHECK(act_size >= static_cast<size_t>(data_size)); | 73 CHECK(act_size >= static_cast<size_t>(data_size)); |
| 73 byte* dest_buffer = static_cast<byte*>(OS::Allocate(data_size, &act_size, 0)); | 74 byte* dest_buffer = |
| 75 static_cast<byte*>(v8::base::OS::Allocate(data_size, &act_size, 0)); |
| 74 CHECK(dest_buffer); | 76 CHECK(dest_buffer); |
| 75 CHECK(act_size >= static_cast<size_t>(data_size)); | 77 CHECK(act_size >= static_cast<size_t>(data_size)); |
| 76 | 78 |
| 77 // Storage for a0 and a1. | 79 // Storage for a0 and a1. |
| 78 byte* a0_; | 80 byte* a0_; |
| 79 byte* a1_; | 81 byte* a1_; |
| 80 | 82 |
| 81 MacroAssembler assembler(isolate, NULL, 0); | 83 MacroAssembler assembler(isolate, NULL, 0); |
| 82 MacroAssembler* masm = &assembler; | 84 MacroAssembler* masm = &assembler; |
| 83 | 85 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 TestNaN( | 169 TestNaN( |
| 168 "var result;" | 170 "var result;" |
| 169 "for (var i = 0; i < 2; i++) {" | 171 "for (var i = 0; i < 2; i++) {" |
| 170 " result = [NaN];" | 172 " result = [NaN];" |
| 171 "}" | 173 "}" |
| 172 "result;"); | 174 "result;"); |
| 173 } | 175 } |
| 174 | 176 |
| 175 | 177 |
| 176 #undef __ | 178 #undef __ |
| OLD | NEW |