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

Side by Side Diff: test/cctest/test-disasm-mips.cc

Issue 12716010: Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed rest Created 7 years, 9 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 compare_string, disasm_buffer.start()); 67 compare_string, disasm_buffer.start());
68 return false; 68 return false;
69 } 69 }
70 return true; 70 return true;
71 } 71 }
72 72
73 73
74 // Set up V8 to a state where we can at least run the assembler and 74 // Set up V8 to a state where we can at least run the assembler and
75 // disassembler. Declare the variables and allocate the data structures used 75 // disassembler. Declare the variables and allocate the data structures used
76 // in the rest of the macros. 76 // in the rest of the macros.
77 #define SET_UP() \ 77 #define SET_UP() \
78 InitializeVM(); \ 78 InitializeVM(); \
79 v8::HandleScope scope; \ 79 Isolate* isolate = Isolate::Current(); \
80 HandleScope scope(isolate); \
80 byte *buffer = reinterpret_cast<byte*>(malloc(4*1024)); \ 81 byte *buffer = reinterpret_cast<byte*>(malloc(4*1024)); \
81 Assembler assm(Isolate::Current(), buffer, 4*1024); \ 82 Assembler assm(isolate, buffer, 4*1024); \
82 bool failure = false; 83 bool failure = false;
83 84
84 85
85 // This macro assembles one instruction using the preallocated assembler and 86 // This macro assembles one instruction using the preallocated assembler and
86 // disassembles the generated instruction, comparing the output to the expected 87 // disassembles the generated instruction, comparing the output to the expected
87 // value. If the comparison fails an error message is printed, but the test 88 // value. If the comparison fails an error message is printed, but the test
88 // continues to run until the end. 89 // continues to run until the end.
89 #define COMPARE(asm_, compare_string) \ 90 #define COMPARE(asm_, compare_string) \
90 { \ 91 { \
91 int pc_offset = assm.pc_offset(); \ 92 int pc_offset = assm.pc_offset(); \
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 COMPARE(ext_(a0, a1, 31, 1), 433 COMPARE(ext_(a0, a1, 31, 1),
433 "7ca407c0 ext a0, a1, 31, 1"); 434 "7ca407c0 ext a0, a1, 31, 1");
434 COMPARE(ext_(s6, s7, 30, 2), 435 COMPARE(ext_(s6, s7, 30, 2),
435 "7ef60f80 ext s6, s7, 30, 2"); 436 "7ef60f80 ext s6, s7, 30, 2");
436 COMPARE(ext_(v0, v1, 0, 32), 437 COMPARE(ext_(v0, v1, 0, 32),
437 "7c62f800 ext v0, v1, 0, 32"); 438 "7c62f800 ext v0, v1, 0, 32");
438 } 439 }
439 440
440 VERIFY_RUN(); 441 VERIFY_RUN();
441 } 442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698