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

Side by Side Diff: src/runtime.cc

Issue 338883003: Rename arguments object support functions to new scheme. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/runtime.h ('k') | src/x64/code-stubs-x64.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 // 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 7976 matching lines...) Expand 10 before | Expand all | Expand 10 after
7987 is_value_nan = true; 7987 is_value_nan = true;
7988 } else { 7988 } else {
7989 value = isolate->factory()->NewNumber(DoubleToInteger(time)); 7989 value = isolate->factory()->NewNumber(DoubleToInteger(time));
7990 } 7990 }
7991 } 7991 }
7992 date->SetValue(*value, is_value_nan); 7992 date->SetValue(*value, is_value_nan);
7993 return *value; 7993 return *value;
7994 } 7994 }
7995 7995
7996 7996
7997 RUNTIME_FUNCTION(RuntimeHidden_NewArgumentsFast) { 7997 RUNTIME_FUNCTION(RuntimeHidden_NewSloppyArguments) {
7998 HandleScope scope(isolate); 7998 HandleScope scope(isolate);
7999 ASSERT(args.length() == 3); 7999 ASSERT(args.length() == 3);
8000 8000
8001 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0); 8001 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0);
8002 Object** parameters = reinterpret_cast<Object**>(args[1]); 8002 Object** parameters = reinterpret_cast<Object**>(args[1]);
8003 CONVERT_SMI_ARG_CHECKED(argument_count, 2); 8003 CONVERT_SMI_ARG_CHECKED(argument_count, 2);
8004 8004
8005 Handle<JSObject> result = 8005 Handle<JSObject> result =
8006 isolate->factory()->NewArgumentsObject(callee, argument_count); 8006 isolate->factory()->NewArgumentsObject(callee, argument_count);
8007 // Allocate the elements if needed. 8007 // Allocate the elements if needed.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
8081 result->set_elements(*elements); 8081 result->set_elements(*elements);
8082 for (int i = 0; i < argument_count; ++i) { 8082 for (int i = 0; i < argument_count; ++i) {
8083 elements->set(i, *(parameters - i - 1)); 8083 elements->set(i, *(parameters - i - 1));
8084 } 8084 }
8085 } 8085 }
8086 } 8086 }
8087 return *result; 8087 return *result;
8088 } 8088 }
8089 8089
8090 8090
8091 RUNTIME_FUNCTION(RuntimeHidden_NewStrictArgumentsFast) { 8091 RUNTIME_FUNCTION(RuntimeHidden_NewStrictArguments) {
8092 HandleScope scope(isolate); 8092 HandleScope scope(isolate);
8093 ASSERT(args.length() == 3); 8093 ASSERT(args.length() == 3);
8094 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0) 8094 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0)
8095 Object** parameters = reinterpret_cast<Object**>(args[1]); 8095 Object** parameters = reinterpret_cast<Object**>(args[1]);
8096 CONVERT_SMI_ARG_CHECKED(length, 2); 8096 CONVERT_SMI_ARG_CHECKED(length, 2);
8097 8097
8098 Handle<JSObject> result = 8098 Handle<JSObject> result =
8099 isolate->factory()->NewArgumentsObject(callee, length); 8099 isolate->factory()->NewArgumentsObject(callee, length);
8100 8100
8101 if (length > 0) { 8101 if (length > 0) {
(...skipping 7109 matching lines...) Expand 10 before | Expand all | Expand 10 after
15211 } 15211 }
15212 return NULL; 15212 return NULL;
15213 } 15213 }
15214 15214
15215 15215
15216 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15216 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15217 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15217 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15218 } 15218 }
15219 15219
15220 } } // namespace v8::internal 15220 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698