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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 7282026: Introduce code flushing of RegExp code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 5 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
« src/objects-debug.cc ('K') | « src/string.js ('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 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 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after
2447 2447
2448 __ bind(&seq_two_byte_string); 2448 __ bind(&seq_two_byte_string);
2449 // rdi: subject string (flat two-byte) 2449 // rdi: subject string (flat two-byte)
2450 // rax: RegExp data (FixedArray) 2450 // rax: RegExp data (FixedArray)
2451 __ movq(r11, FieldOperand(rax, JSRegExp::kDataUC16CodeOffset)); 2451 __ movq(r11, FieldOperand(rax, JSRegExp::kDataUC16CodeOffset));
2452 __ Set(rcx, 0); // Type is two byte. 2452 __ Set(rcx, 0); // Type is two byte.
2453 2453
2454 __ bind(&check_code); 2454 __ bind(&check_code);
2455 // Check that the irregexp code has been generated for the actual string 2455 // Check that the irregexp code has been generated for the actual string
2456 // encoding. If it has, the field contains a code object otherwise it contains 2456 // encoding. If it has, the field contains a code object otherwise it contains
2457 // the hole. 2457 // smi (code flushing support)
2458 __ CmpObjectType(r11, CODE_TYPE, kScratchRegister); 2458 __ JumpIfSmi(r11, &runtime);
2459 __ j(not_equal, &runtime);
2460 2459
2461 // rdi: subject string 2460 // rdi: subject string
2462 // rcx: encoding of subject string (1 if ascii, 0 if two_byte); 2461 // rcx: encoding of subject string (1 if ascii, 0 if two_byte);
2463 // r11: code 2462 // r11: code
2464 // Load used arguments before starting to push arguments for call to native 2463 // Load used arguments before starting to push arguments for call to native
2465 // RegExp code to avoid handling changing stack height. 2464 // RegExp code to avoid handling changing stack height.
2466 __ SmiToInteger64(rbx, Operand(rsp, kPreviousIndexOffset)); 2465 __ SmiToInteger64(rbx, Operand(rsp, kPreviousIndexOffset));
2467 2466
2468 // rdi: subject string 2467 // rdi: subject string
2469 // rbx: previous index 2468 // rbx: previous index
(...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after
5339 __ Drop(1); 5338 __ Drop(1);
5340 __ ret(2 * kPointerSize); 5339 __ ret(2 * kPointerSize);
5341 } 5340 }
5342 5341
5343 5342
5344 #undef __ 5343 #undef __
5345 5344
5346 } } // namespace v8::internal 5345 } } // namespace v8::internal
5347 5346
5348 #endif // V8_TARGET_ARCH_X64 5347 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/objects-debug.cc ('K') | « src/string.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698