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

Side by Side Diff: test/cctest/test-disasm-arm.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: Feedback. Rebased 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
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-disasm-ia32.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 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 compare_string, disasm_buffer.start()); 65 compare_string, disasm_buffer.start());
66 return false; 66 return false;
67 } 67 }
68 return true; 68 return true;
69 } 69 }
70 70
71 71
72 // Set up V8 to a state where we can at least run the assembler and 72 // Set up V8 to a state where we can at least run the assembler and
73 // disassembler. Declare the variables and allocate the data structures used 73 // disassembler. Declare the variables and allocate the data structures used
74 // in the rest of the macros. 74 // in the rest of the macros.
75 #define SET_UP() \ 75 #define SET_UP() \
76 InitializeVM(); \ 76 InitializeVM(); \
77 v8::HandleScope scope; \ 77 Isolate* isolate = Isolate::Current(); \
78 HandleScope scope(isolate); \
78 byte *buffer = reinterpret_cast<byte*>(malloc(4*1024)); \ 79 byte *buffer = reinterpret_cast<byte*>(malloc(4*1024)); \
79 Assembler assm(Isolate::Current(), buffer, 4*1024); \ 80 Assembler assm(isolate, buffer, 4*1024); \
80 bool failure = false; 81 bool failure = false;
81 82
82 83
83 // This macro assembles one instruction using the preallocated assembler and 84 // This macro assembles one instruction using the preallocated assembler and
84 // disassembles the generated instruction, comparing the output to the expected 85 // disassembles the generated instruction, comparing the output to the expected
85 // value. If the comparison fails an error message is printed, but the test 86 // value. If the comparison fails an error message is printed, but the test
86 // continues to run until the end. 87 // continues to run until the end.
87 #define COMPARE(asm_, compare_string) \ 88 #define COMPARE(asm_, compare_string) \
88 { \ 89 { \
89 int pc_offset = assm.pc_offset(); \ 90 int pc_offset = assm.pc_offset(); \
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 COMPARE(strd(r8, r9, MemOperand(r9, -127, PostIndex)), 862 COMPARE(strd(r8, r9, MemOperand(r9, -127, PostIndex)),
862 "e04987ff strd r8, [r9], #-127"); 863 "e04987ff strd r8, [r9], #-127");
863 COMPARE(strd(r10, fp, MemOperand(fp, 127, PreIndex)), 864 COMPARE(strd(r10, fp, MemOperand(fp, 127, PreIndex)),
864 "e1eba7ff strd r10, [fp, #+127]!"); 865 "e1eba7ff strd r10, [fp, #+127]!");
865 COMPARE(strd(ip, sp, MemOperand(sp, -127, PreIndex)), 866 COMPARE(strd(ip, sp, MemOperand(sp, -127, PreIndex)),
866 "e16dc7ff strd ip, [sp, #-127]!"); 867 "e16dc7ff strd ip, [sp, #-127]!");
867 } 868 }
868 869
869 VERIFY_RUN(); 870 VERIFY_RUN();
870 } 871 }
OLDNEW
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698