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

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-visiting.h ('K') | « src/objects-visiting.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 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 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 2448
2449 __ bind(&seq_two_byte_string); 2449 __ bind(&seq_two_byte_string);
2450 // rdi: subject string (flat two-byte) 2450 // rdi: subject string (flat two-byte)
2451 // rax: RegExp data (FixedArray) 2451 // rax: RegExp data (FixedArray)
2452 __ movq(r11, FieldOperand(rax, JSRegExp::kDataUC16CodeOffset)); 2452 __ movq(r11, FieldOperand(rax, JSRegExp::kDataUC16CodeOffset));
2453 __ Set(rcx, 0); // Type is two byte. 2453 __ Set(rcx, 0); // Type is two byte.
2454 2454
2455 __ bind(&check_code); 2455 __ bind(&check_code);
2456 // Check that the irregexp code has been generated for the actual string 2456 // Check that the irregexp code has been generated for the actual string
2457 // encoding. If it has, the field contains a code object otherwise it contains 2457 // encoding. If it has, the field contains a code object otherwise it contains
2458 // the hole. 2458 // smi (code flushing support)
2459 __ CmpObjectType(r11, CODE_TYPE, kScratchRegister); 2459 __ JumpIfSmi(r11, &runtime);
2460 __ j(not_equal, &runtime); 2460 __ j(not_equal, &runtime);
Erik Corry 2011/06/30 18:48:25 Hat trick!
Rico 2011/07/01 05:58:09 Done.
2461 2461
2462 // rdi: subject string 2462 // rdi: subject string
2463 // rcx: encoding of subject string (1 if ascii, 0 if two_byte); 2463 // rcx: encoding of subject string (1 if ascii, 0 if two_byte);
2464 // r11: code 2464 // r11: code
2465 // Load used arguments before starting to push arguments for call to native 2465 // Load used arguments before starting to push arguments for call to native
2466 // RegExp code to avoid handling changing stack height. 2466 // RegExp code to avoid handling changing stack height.
2467 __ SmiToInteger64(rbx, Operand(rsp, kPreviousIndexOffset)); 2467 __ SmiToInteger64(rbx, Operand(rsp, kPreviousIndexOffset));
2468 2468
2469 // rdi: subject string 2469 // rdi: subject string
2470 // rbx: previous index 2470 // rbx: previous index
(...skipping 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after
5340 __ Drop(1); 5340 __ Drop(1);
5341 __ ret(2 * kPointerSize); 5341 __ ret(2 * kPointerSize);
5342 } 5342 }
5343 5343
5344 5344
5345 #undef __ 5345 #undef __
5346 5346
5347 } } // namespace v8::internal 5347 } } // namespace v8::internal
5348 5348
5349 #endif // V8_TARGET_ARCH_X64 5349 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/objects-visiting.h ('K') | « src/objects-visiting.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698