| OLD | NEW |
| 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 "v8.h" | 8 #include "v8.h" |
| 9 | 9 |
| 10 #include "accessors.h" | 10 #include "accessors.h" |
| (...skipping 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2791 return Smi::FromInt(0); | 2791 return Smi::FromInt(0); |
| 2792 } | 2792 } |
| 2793 | 2793 |
| 2794 | 2794 |
| 2795 static Handle<JSFunction> InstallBuiltin(Isolate* isolate, | 2795 static Handle<JSFunction> InstallBuiltin(Isolate* isolate, |
| 2796 Handle<JSObject> holder, | 2796 Handle<JSObject> holder, |
| 2797 const char* name, | 2797 const char* name, |
| 2798 Builtins::Name builtin_name) { | 2798 Builtins::Name builtin_name) { |
| 2799 Handle<String> key = isolate->factory()->InternalizeUtf8String(name); | 2799 Handle<String> key = isolate->factory()->InternalizeUtf8String(name); |
| 2800 Handle<Code> code(isolate->builtins()->builtin(builtin_name)); | 2800 Handle<Code> code(isolate->builtins()->builtin(builtin_name)); |
| 2801 Handle<JSFunction> optimized = | 2801 Handle<JSFunction> optimized = isolate->factory()->NewFunction( |
| 2802 isolate->factory()->NewFunction(MaybeHandle<Object>(), | 2802 key, MaybeHandle<Object>(), code); |
| 2803 key, | |
| 2804 JS_OBJECT_TYPE, | |
| 2805 JSObject::kHeaderSize, | |
| 2806 code, | |
| 2807 false); | |
| 2808 optimized->shared()->DontAdaptArguments(); | 2803 optimized->shared()->DontAdaptArguments(); |
| 2809 JSReceiver::SetProperty(holder, key, optimized, NONE, STRICT).Assert(); | 2804 JSReceiver::SetProperty(holder, key, optimized, NONE, STRICT).Assert(); |
| 2810 return optimized; | 2805 return optimized; |
| 2811 } | 2806 } |
| 2812 | 2807 |
| 2813 | 2808 |
| 2814 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { | 2809 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { |
| 2815 HandleScope scope(isolate); | 2810 HandleScope scope(isolate); |
| 2816 ASSERT(args.length() == 1); | 2811 ASSERT(args.length() == 1); |
| 2817 CONVERT_ARG_HANDLE_CHECKED(JSObject, holder, 0); | 2812 CONVERT_ARG_HANDLE_CHECKED(JSObject, holder, 0); |
| (...skipping 12422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15240 } | 15235 } |
| 15241 return NULL; | 15236 return NULL; |
| 15242 } | 15237 } |
| 15243 | 15238 |
| 15244 | 15239 |
| 15245 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15240 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15246 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15241 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15247 } | 15242 } |
| 15248 | 15243 |
| 15249 } } // namespace v8::internal | 15244 } } // namespace v8::internal |
| OLD | NEW |