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

Side by Side Diff: src/ia32/code-stubs-ia32.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
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 3361 matching lines...) Expand 10 before | Expand all | Expand 10 after
3372 3372
3373 __ bind(&seq_two_byte_string); 3373 __ bind(&seq_two_byte_string);
3374 // eax: subject string (flat two byte) 3374 // eax: subject string (flat two byte)
3375 // ecx: RegExp data (FixedArray) 3375 // ecx: RegExp data (FixedArray)
3376 __ mov(edx, FieldOperand(ecx, JSRegExp::kDataUC16CodeOffset)); 3376 __ mov(edx, FieldOperand(ecx, JSRegExp::kDataUC16CodeOffset));
3377 __ Set(edi, Immediate(0)); // Type is two byte. 3377 __ Set(edi, Immediate(0)); // Type is two byte.
3378 3378
3379 __ bind(&check_code); 3379 __ bind(&check_code);
3380 // Check that the irregexp code has been generated for the actual string 3380 // Check that the irregexp code has been generated for the actual string
3381 // encoding. If it has, the field contains a code object otherwise it contains 3381 // encoding. If it has, the field contains a code object otherwise it contains
3382 // the hole. 3382 // a smi (code flushing support).
3383 __ CmpObjectType(edx, CODE_TYPE, ebx); 3383 __ JumpIfSmi(edx, &runtime);
3384 __ j(not_equal, &runtime);
3385 3384
3386 // eax: subject string 3385 // eax: subject string
3387 // edx: code 3386 // edx: code
3388 // edi: encoding of subject string (1 if ascii, 0 if two_byte); 3387 // edi: encoding of subject string (1 if ascii, 0 if two_byte);
3389 // Load used arguments before starting to push arguments for call to native 3388 // Load used arguments before starting to push arguments for call to native
3390 // RegExp code to avoid handling changing stack height. 3389 // RegExp code to avoid handling changing stack height.
3391 __ mov(ebx, Operand(esp, kPreviousIndexOffset)); 3390 __ mov(ebx, Operand(esp, kPreviousIndexOffset));
3392 __ SmiUntag(ebx); // Previous index from smi. 3391 __ SmiUntag(ebx); // Previous index from smi.
3393 3392
3394 // eax: subject string 3393 // eax: subject string
(...skipping 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
6348 __ Drop(1); 6347 __ Drop(1);
6349 __ ret(2 * kPointerSize); 6348 __ ret(2 * kPointerSize);
6350 } 6349 }
6351 6350
6352 6351
6353 #undef __ 6352 #undef __
6354 6353
6355 } } // namespace v8::internal 6354 } } // namespace v8::internal
6356 6355
6357 #endif // V8_TARGET_ARCH_IA32 6356 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/jsregexp.cc » ('j') | src/objects-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698