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

Side by Side Diff: src/assembler.cc

Issue 7307030: Implement ICs for FastDoubleArray loads and stores (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback 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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 2011 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 //
11 // - Redistribution in binary form must reproduce the above copyright 11 // - Redistribution in binary form must reproduce the above copyright
(...skipping 28 matching lines...) Expand all
40 #include "ic-inl.h" 40 #include "ic-inl.h"
41 #include "factory.h" 41 #include "factory.h"
42 #include "runtime.h" 42 #include "runtime.h"
43 #include "runtime-profiler.h" 43 #include "runtime-profiler.h"
44 #include "serialize.h" 44 #include "serialize.h"
45 #include "stub-cache.h" 45 #include "stub-cache.h"
46 #include "regexp-stack.h" 46 #include "regexp-stack.h"
47 #include "ast.h" 47 #include "ast.h"
48 #include "regexp-macro-assembler.h" 48 #include "regexp-macro-assembler.h"
49 #include "platform.h" 49 #include "platform.h"
50 #include "v8.h"
Mads Ager (chromium) 2011/07/13 09:43:09 This is already included above.
danno 2011/07/13 14:11:03 Done.
50 // Include native regexp-macro-assembler. 51 // Include native regexp-macro-assembler.
51 #ifndef V8_INTERPRETED_REGEXP 52 #ifndef V8_INTERPRETED_REGEXP
52 #if V8_TARGET_ARCH_IA32 53 #if V8_TARGET_ARCH_IA32
53 #include "ia32/regexp-macro-assembler-ia32.h" 54 #include "ia32/regexp-macro-assembler-ia32.h"
54 #elif V8_TARGET_ARCH_X64 55 #elif V8_TARGET_ARCH_X64
55 #include "x64/regexp-macro-assembler-x64.h" 56 #include "x64/regexp-macro-assembler-x64.h"
56 #elif V8_TARGET_ARCH_ARM 57 #elif V8_TARGET_ARCH_ARM
57 #include "arm/regexp-macro-assembler-arm.h" 58 #include "arm/regexp-macro-assembler-arm.h"
58 #elif V8_TARGET_ARCH_MIPS 59 #elif V8_TARGET_ARCH_MIPS
59 #include "mips/regexp-macro-assembler-mips.h" 60 #include "mips/regexp-macro-assembler-mips.h"
60 #else // Unknown architecture. 61 #else // Unknown architecture.
61 #error "Unknown architecture." 62 #error "Unknown architecture."
62 #endif // Target architecture. 63 #endif // Target architecture.
63 #endif // V8_INTERPRETED_REGEXP 64 #endif // V8_INTERPRETED_REGEXP
64 65
65 namespace v8 { 66 namespace v8 {
66 namespace internal { 67 namespace internal {
67 68
68 69
69 const double DoubleConstant::min_int = kMinInt; 70 const double DoubleConstant::min_int = kMinInt;
70 const double DoubleConstant::one_half = 0.5; 71 const double DoubleConstant::one_half = 0.5;
71 const double DoubleConstant::minus_zero = -0.0; 72 const double DoubleConstant::minus_zero = -0.0;
72 const double DoubleConstant::uint8_max_value = 255; 73 const double DoubleConstant::uint8_max_value = 255;
73 const double DoubleConstant::zero = 0.0; 74 const double DoubleConstant::zero = 0.0;
74 const double DoubleConstant::nan = OS::nan_value(); 75 const double DoubleConstant::canonical_non_hole_nan =
76 BitCast<double>(kCanonicalNonHoleNanInt64);
77 const double DoubleConstant::the_hole_nan = BitCast<double>(kHoleNanInt64);
75 const double DoubleConstant::negative_infinity = -V8_INFINITY; 78 const double DoubleConstant::negative_infinity = -V8_INFINITY;
76 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; 79 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING";
77 80
78 // ----------------------------------------------------------------------------- 81 // -----------------------------------------------------------------------------
79 // Implementation of AssemblerBase 82 // Implementation of AssemblerBase
80 83
81 AssemblerBase::AssemblerBase(Isolate* isolate) 84 AssemblerBase::AssemblerBase(Isolate* isolate)
82 : isolate_(isolate), 85 : isolate_(isolate),
83 jit_cookie_(0) { 86 jit_cookie_(0) {
84 if (FLAG_mask_constants_with_cookie && isolate != NULL) { 87 if (FLAG_mask_constants_with_cookie && isolate != NULL) {
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 const_cast<double*>(&DoubleConstant::uint8_max_value))); 917 const_cast<double*>(&DoubleConstant::uint8_max_value)));
915 } 918 }
916 919
917 920
918 ExternalReference ExternalReference::address_of_negative_infinity() { 921 ExternalReference ExternalReference::address_of_negative_infinity() {
919 return ExternalReference(reinterpret_cast<void*>( 922 return ExternalReference(reinterpret_cast<void*>(
920 const_cast<double*>(&DoubleConstant::negative_infinity))); 923 const_cast<double*>(&DoubleConstant::negative_infinity)));
921 } 924 }
922 925
923 926
924 ExternalReference ExternalReference::address_of_nan() { 927 ExternalReference ExternalReference::address_of_canonical_non_hole_nan() {
925 return ExternalReference(reinterpret_cast<void*>( 928 return ExternalReference(reinterpret_cast<void*>(
926 const_cast<double*>(&DoubleConstant::nan))); 929 const_cast<double*>(&DoubleConstant::canonical_non_hole_nan)));
927 } 930 }
928 931
929 932
933 ExternalReference ExternalReference::address_of_the_hole_nan() {
934 return ExternalReference(reinterpret_cast<void*>(
935 const_cast<double*>(&DoubleConstant::the_hole_nan)));
936 }
937
938
930 #ifndef V8_INTERPRETED_REGEXP 939 #ifndef V8_INTERPRETED_REGEXP
931 940
932 ExternalReference ExternalReference::re_check_stack_guard_state( 941 ExternalReference ExternalReference::re_check_stack_guard_state(
933 Isolate* isolate) { 942 Isolate* isolate) {
934 Address function; 943 Address function;
935 #ifdef V8_TARGET_ARCH_X64 944 #ifdef V8_TARGET_ARCH_X64
936 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); 945 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState);
937 #elif V8_TARGET_ARCH_IA32 946 #elif V8_TARGET_ARCH_IA32
938 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); 947 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState);
939 #elif V8_TARGET_ARCH_ARM 948 #elif V8_TARGET_ARCH_ARM
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1207 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1199 state_.written_position = state_.current_position; 1208 state_.written_position = state_.current_position;
1200 written = true; 1209 written = true;
1201 } 1210 }
1202 1211
1203 // Return whether something was written. 1212 // Return whether something was written.
1204 return written; 1213 return written;
1205 } 1214 }
1206 1215
1207 } } // namespace v8::internal 1216 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698