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

Side by Side Diff: src/ia32/codegen-ia32.cc

Issue 104203003: Remove unused trigonometric code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 7 years 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/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 UnaryMathFunction CreateTranscendentalFunction(TranscendentalCache::Type type) { 60 UnaryMathFunction CreateTranscendentalFunction(TranscendentalCache::Type type) {
61 size_t actual_size; 61 size_t actual_size;
62 // Allocate buffer in executable space. 62 // Allocate buffer in executable space.
63 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, 63 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB,
64 &actual_size, 64 &actual_size,
65 true)); 65 true));
66 if (buffer == NULL) { 66 if (buffer == NULL) {
67 // Fallback to library function if function cannot be created. 67 // Fallback to library function if function cannot be created.
68 switch (type) { 68 switch (type) {
69 case TranscendentalCache::SIN: return &sin;
70 case TranscendentalCache::COS: return &cos;
71 case TranscendentalCache::TAN: return &tan;
72 case TranscendentalCache::LOG: return &log; 69 case TranscendentalCache::LOG: return &log;
73 default: UNIMPLEMENTED(); 70 default: UNIMPLEMENTED();
74 } 71 }
75 } 72 }
76 73
77 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 74 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
78 // esp[1 * kPointerSize]: raw double input 75 // esp[1 * kPointerSize]: raw double input
79 // esp[0 * kPointerSize]: return address 76 // esp[0 * kPointerSize]: return address
80 // Move double input into registers. 77 // Move double input into registers.
81 78
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 Code* stub = GetCodeAgeStub(isolate, age, parity); 1171 Code* stub = GetCodeAgeStub(isolate, age, parity);
1175 CodePatcher patcher(sequence, young_length); 1172 CodePatcher patcher(sequence, young_length);
1176 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 1173 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
1177 } 1174 }
1178 } 1175 }
1179 1176
1180 1177
1181 } } // namespace v8::internal 1178 } } // namespace v8::internal
1182 1179
1183 #endif // V8_TARGET_ARCH_IA32 1180 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698