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 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2799 return Smi::FromInt(0); | 2799 return Smi::FromInt(0); |
2800 } | 2800 } |
2801 | 2801 |
2802 | 2802 |
2803 static Handle<JSFunction> InstallBuiltin(Isolate* isolate, | 2803 static Handle<JSFunction> InstallBuiltin(Isolate* isolate, |
2804 Handle<JSObject> holder, | 2804 Handle<JSObject> holder, |
2805 const char* name, | 2805 const char* name, |
2806 Builtins::Name builtin_name) { | 2806 Builtins::Name builtin_name) { |
2807 Handle<String> key = isolate->factory()->InternalizeUtf8String(name); | 2807 Handle<String> key = isolate->factory()->InternalizeUtf8String(name); |
2808 Handle<Code> code(isolate->builtins()->builtin(builtin_name)); | 2808 Handle<Code> code(isolate->builtins()->builtin(builtin_name)); |
2809 Handle<JSFunction> optimized = isolate->factory()->NewFunction(key, code); | 2809 Handle<JSFunction> optimized = |
| 2810 isolate->factory()->NewFunctionWithoutPrototype(key, code); |
2810 optimized->shared()->DontAdaptArguments(); | 2811 optimized->shared()->DontAdaptArguments(); |
2811 JSReceiver::SetProperty(holder, key, optimized, NONE, STRICT).Assert(); | 2812 JSReceiver::SetProperty(holder, key, optimized, NONE, STRICT).Assert(); |
2812 return optimized; | 2813 return optimized; |
2813 } | 2814 } |
2814 | 2815 |
2815 | 2816 |
2816 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { | 2817 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { |
2817 HandleScope scope(isolate); | 2818 HandleScope scope(isolate); |
2818 ASSERT(args.length() == 1); | 2819 ASSERT(args.length() == 1); |
2819 CONVERT_ARG_HANDLE_CHECKED(JSObject, holder, 0); | 2820 CONVERT_ARG_HANDLE_CHECKED(JSObject, holder, 0); |
(...skipping 12438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15258 } | 15259 } |
15259 return NULL; | 15260 return NULL; |
15260 } | 15261 } |
15261 | 15262 |
15262 | 15263 |
15263 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15264 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15264 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15265 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15265 } | 15266 } |
15266 | 15267 |
15267 } } // namespace v8::internal | 15268 } } // namespace v8::internal |
OLD | NEW |