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

Side by Side Diff: src/runtime.cc

Issue 594493002: [turbofan] Add operators for float32 support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 2 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/conversions-inl.h ('k') | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 7953 matching lines...) Expand 10 before | Expand all | Expand 10 after
7964 CONVERT_DOUBLE_ARG_CHECKED(x, 0); 7964 CONVERT_DOUBLE_ARG_CHECKED(x, 0);
7965 return *isolate->factory()->NewNumber(fast_sqrt(x)); 7965 return *isolate->factory()->NewNumber(fast_sqrt(x));
7966 } 7966 }
7967 7967
7968 7968
7969 RUNTIME_FUNCTION(Runtime_MathFround) { 7969 RUNTIME_FUNCTION(Runtime_MathFround) {
7970 HandleScope scope(isolate); 7970 HandleScope scope(isolate);
7971 DCHECK(args.length() == 1); 7971 DCHECK(args.length() == 1);
7972 7972
7973 CONVERT_DOUBLE_ARG_CHECKED(x, 0); 7973 CONVERT_DOUBLE_ARG_CHECKED(x, 0);
7974 float xf = static_cast<float>(x); 7974 float xf = DoubleToFloat32(x);
7975 return *isolate->factory()->NewNumber(xf); 7975 return *isolate->factory()->NewNumber(xf);
7976 } 7976 }
7977 7977
7978 7978
7979 RUNTIME_FUNCTION(Runtime_DateMakeDay) { 7979 RUNTIME_FUNCTION(Runtime_DateMakeDay) {
7980 SealHandleScope shs(isolate); 7980 SealHandleScope shs(isolate);
7981 DCHECK(args.length() == 2); 7981 DCHECK(args.length() == 2);
7982 7982
7983 CONVERT_SMI_ARG_CHECKED(year, 0); 7983 CONVERT_SMI_ARG_CHECKED(year, 0);
7984 CONVERT_SMI_ARG_CHECKED(month, 1); 7984 CONVERT_SMI_ARG_CHECKED(month, 1);
(...skipping 7754 matching lines...) Expand 10 before | Expand all | Expand 10 after
15739 } 15739 }
15740 return NULL; 15740 return NULL;
15741 } 15741 }
15742 15742
15743 15743
15744 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15744 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15745 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15745 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15746 } 15746 }
15747 15747
15748 } } // namespace v8::internal 15748 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/conversions-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698