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

Side by Side Diff: src/assembler.cc

Issue 173567: ARM native regexps. (Closed)
Patch Set: Created 11 years, 3 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
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 24 matching lines...) Expand all
35 #include "v8.h" 35 #include "v8.h"
36 36
37 #include "arguments.h" 37 #include "arguments.h"
38 #include "execution.h" 38 #include "execution.h"
39 #include "ic-inl.h" 39 #include "ic-inl.h"
40 #include "factory.h" 40 #include "factory.h"
41 #include "runtime.h" 41 #include "runtime.h"
42 #include "serialize.h" 42 #include "serialize.h"
43 #include "stub-cache.h" 43 #include "stub-cache.h"
44 #include "regexp-stack.h" 44 #include "regexp-stack.h"
45 #include "ast.h"
46 #include "regexp-macro-assembler.h"
47 // Include native regexp-macro-assembler.
48 #ifdef V8_NATIVE_REGEXP
49 #if V8_TARGET_ARCH_IA32
50 #include "ia32/regexp-macro-assembler-ia32.h"
51 #elif V8_TARGET_ARCH_X64
52 #include "x64/regexp-macro-assembler-x64.h"
53 #elif V8_TARGET_ARCH_ARM
54 #include "arm/regexp-macro-assembler-arm.h"
55 #else // Unknown architecture.
56 #error "Unknown architecture."
57 #endif // Target architecture.
58 #endif // V8_NATIVE_REGEXP
45 59
46 namespace v8 { 60 namespace v8 {
47 namespace internal { 61 namespace internal {
48 62
49 63
50 // ----------------------------------------------------------------------------- 64 // -----------------------------------------------------------------------------
51 // Implementation of Label 65 // Implementation of Label
52 66
53 int Label::pos() const { 67 int Label::pos() const {
54 if (pos_ < 0) return -pos_ - 1; 68 if (pos_ < 0) return -pos_ - 1;
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 604
591 ExternalReference ExternalReference::heap_always_allocate_scope_depth() { 605 ExternalReference ExternalReference::heap_always_allocate_scope_depth() {
592 return ExternalReference(Heap::always_allocate_scope_depth_address()); 606 return ExternalReference(Heap::always_allocate_scope_depth_address());
593 } 607 }
594 608
595 609
596 ExternalReference ExternalReference::new_space_allocation_limit_address() { 610 ExternalReference ExternalReference::new_space_allocation_limit_address() {
597 return ExternalReference(Heap::NewSpaceAllocationLimitAddress()); 611 return ExternalReference(Heap::NewSpaceAllocationLimitAddress());
598 } 612 }
599 613
614 #ifdef V8_NATIVE_REGEXP
615
616 ExternalReference ExternalReference::re_check_stack_guard_state() {
617 Address function;
618 #ifdef V8_TARGET_ARCH_X64
619 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState);
620 #elif V8_TARGET_ARCH_IA32
621 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState);
622 #elif V8_TARGET_ARCH_ARM
623 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState);
624 #else
625 UNREACHABLE("Unexpected architecture");
626 #endif
627 return ExternalReference(Redirect(function));
628 }
629
630 ExternalReference ExternalReference::re_grow_stack() {
631 return ExternalReference(
632 Redirect(FUNCTION_ADDR(NativeRegExpMacroAssembler::GrowStack)));
633 }
634
635 ExternalReference ExternalReference::re_case_insensitive_compare_uc16() {
636 return ExternalReference(Redirect(
637 FUNCTION_ADDR(NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16)));
638 }
639
640 #endif
641
600 642
601 static double add_two_doubles(double x, double y) { 643 static double add_two_doubles(double x, double y) {
602 return x + y; 644 return x + y;
603 } 645 }
604 646
605 647
606 static double sub_two_doubles(double x, double y) { 648 static double sub_two_doubles(double x, double y) {
607 return x - y; 649 return x - y;
608 } 650 }
609 651
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break))); 713 return ExternalReference(Redirect(FUNCTION_ADDR(Debug::Break)));
672 } 714 }
673 715
674 716
675 ExternalReference ExternalReference::debug_step_in_fp_address() { 717 ExternalReference ExternalReference::debug_step_in_fp_address() {
676 return ExternalReference(Debug::step_in_fp_addr()); 718 return ExternalReference(Debug::step_in_fp_addr());
677 } 719 }
678 #endif 720 #endif
679 721
680 } } // namespace v8::internal 722 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698