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

Side by Side Diff: src/mips/regexp-macro-assembler-mips.cc

Issue 12939010: MIPS: Critical fix for label binding in RegExp engine when trampoline is emitted. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 Pop(a0); 998 Pop(a0);
999 __ sw(a0, register_location(register_index)); 999 __ sw(a0, register_location(register_index));
1000 } 1000 }
1001 1001
1002 1002
1003 void RegExpMacroAssemblerMIPS::PushBacktrack(Label* label) { 1003 void RegExpMacroAssemblerMIPS::PushBacktrack(Label* label) {
1004 if (label->is_bound()) { 1004 if (label->is_bound()) {
1005 int target = label->pos(); 1005 int target = label->pos();
1006 __ li(a0, Operand(target + Code::kHeaderSize - kHeapObjectTag)); 1006 __ li(a0, Operand(target + Code::kHeaderSize - kHeapObjectTag));
1007 } else { 1007 } else {
1008 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
1008 Label after_constant; 1009 Label after_constant;
1009 __ Branch(&after_constant); 1010 __ Branch(&after_constant);
1010 int offset = masm_->pc_offset(); 1011 int offset = masm_->pc_offset();
1011 int cp_offset = offset + Code::kHeaderSize - kHeapObjectTag; 1012 int cp_offset = offset + Code::kHeaderSize - kHeapObjectTag;
1012 __ emit(0); 1013 __ emit(0);
1013 masm_->label_at_put(label, offset); 1014 masm_->label_at_put(label, offset);
1014 __ bind(&after_constant); 1015 __ bind(&after_constant);
1015 if (is_int16(cp_offset)) { 1016 if (is_int16(cp_offset)) {
1016 __ lw(a0, MemOperand(code_pointer(), cp_offset)); 1017 __ lw(a0, MemOperand(code_pointer(), cp_offset));
1017 } else { 1018 } else {
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 } 1380 }
1380 1381
1381 1382
1382 #undef __ 1383 #undef __
1383 1384
1384 #endif // V8_INTERPRETED_REGEXP 1385 #endif // V8_INTERPRETED_REGEXP
1385 1386
1386 }} // namespace v8::internal 1387 }} // namespace v8::internal
1387 1388
1388 #endif // V8_TARGET_ARCH_MIPS 1389 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698