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

Side by Side Diff: src/assembler.cc

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « src/assembler.h ('k') | src/ast.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #endif // Target architecture. 64 #endif // Target architecture.
65 #endif // V8_INTERPRETED_REGEXP 65 #endif // V8_INTERPRETED_REGEXP
66 66
67 namespace v8 { 67 namespace v8 {
68 namespace internal { 68 namespace internal {
69 69
70 70
71 const double DoubleConstant::min_int = kMinInt; 71 const double DoubleConstant::min_int = kMinInt;
72 const double DoubleConstant::one_half = 0.5; 72 const double DoubleConstant::one_half = 0.5;
73 const double DoubleConstant::minus_zero = -0.0; 73 const double DoubleConstant::minus_zero = -0.0;
74 const double DoubleConstant::uint8_max_value = 255;
75 const double DoubleConstant::zero = 0.0;
74 const double DoubleConstant::nan = OS::nan_value(); 76 const double DoubleConstant::nan = OS::nan_value();
75 const double DoubleConstant::negative_infinity = -V8_INFINITY; 77 const double DoubleConstant::negative_infinity = -V8_INFINITY;
76 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; 78 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING";
77 79
78 // ----------------------------------------------------------------------------- 80 // -----------------------------------------------------------------------------
81 // Implementation of AssemblerBase
82
83 AssemblerBase::AssemblerBase(Isolate* isolate)
84 : isolate_(isolate),
85 jit_cookie_(0) {
86 if (FLAG_mask_constants_with_cookie && isolate != NULL) {
87 jit_cookie_ = V8::RandomPrivate(isolate);
88 }
89 }
90
91
92 // -----------------------------------------------------------------------------
79 // Implementation of Label 93 // Implementation of Label
80 94
81 int Label::pos() const { 95 int Label::pos() const {
82 if (pos_ < 0) return -pos_ - 1; 96 if (pos_ < 0) return -pos_ - 1;
83 if (pos_ > 0) return pos_ - 1; 97 if (pos_ > 0) return pos_ - 1;
84 UNREACHABLE(); 98 UNREACHABLE();
85 return 0; 99 return 0;
86 } 100 }
87 101
88 102
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 const_cast<double*>(&DoubleConstant::one_half))); 919 const_cast<double*>(&DoubleConstant::one_half)));
906 } 920 }
907 921
908 922
909 ExternalReference ExternalReference::address_of_minus_zero() { 923 ExternalReference ExternalReference::address_of_minus_zero() {
910 return ExternalReference(reinterpret_cast<void*>( 924 return ExternalReference(reinterpret_cast<void*>(
911 const_cast<double*>(&DoubleConstant::minus_zero))); 925 const_cast<double*>(&DoubleConstant::minus_zero)));
912 } 926 }
913 927
914 928
929 ExternalReference ExternalReference::address_of_zero() {
930 return ExternalReference(reinterpret_cast<void*>(
931 const_cast<double*>(&DoubleConstant::zero)));
932 }
933
934
935 ExternalReference ExternalReference::address_of_uint8_max_value() {
936 return ExternalReference(reinterpret_cast<void*>(
937 const_cast<double*>(&DoubleConstant::uint8_max_value)));
938 }
939
940
915 ExternalReference ExternalReference::address_of_negative_infinity() { 941 ExternalReference ExternalReference::address_of_negative_infinity() {
916 return ExternalReference(reinterpret_cast<void*>( 942 return ExternalReference(reinterpret_cast<void*>(
917 const_cast<double*>(&DoubleConstant::negative_infinity))); 943 const_cast<double*>(&DoubleConstant::negative_infinity)));
918 } 944 }
919 945
920 946
921 ExternalReference ExternalReference::address_of_nan() { 947 ExternalReference ExternalReference::address_of_nan() {
922 return ExternalReference(reinterpret_cast<void*>( 948 return ExternalReference(reinterpret_cast<void*>(
923 const_cast<double*>(&DoubleConstant::nan))); 949 const_cast<double*>(&DoubleConstant::nan)));
924 } 950 }
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1221 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1196 state_.written_position = state_.current_position; 1222 state_.written_position = state_.current_position;
1197 written = true; 1223 written = true;
1198 } 1224 }
1199 1225
1200 // Return whether something was written. 1226 // Return whether something was written.
1201 return written; 1227 return written;
1202 } 1228 }
1203 1229
1204 } } // namespace v8::internal 1230 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698