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

Side by Side Diff: src/runtime.cc

Issue 264973020: Replace NewFunction(MaybeHandle<> prototype by Handle<> prototype (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 7 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/factory.cc ('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 "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
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( 2809 Handle<JSFunction> optimized = isolate->factory()->NewFunction(key, code);
2810 key, MaybeHandle<Object>(), code);
2811 optimized->shared()->DontAdaptArguments(); 2810 optimized->shared()->DontAdaptArguments();
2812 JSReceiver::SetProperty(holder, key, optimized, NONE, STRICT).Assert(); 2811 JSReceiver::SetProperty(holder, key, optimized, NONE, STRICT).Assert();
2813 return optimized; 2812 return optimized;
2814 } 2813 }
2815 2814
2816 2815
2817 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) { 2816 RUNTIME_FUNCTION(Runtime_SpecialArrayFunctions) {
2818 HandleScope scope(isolate); 2817 HandleScope scope(isolate);
2819 ASSERT(args.length() == 1); 2818 ASSERT(args.length() == 1);
2820 CONVERT_ARG_HANDLE_CHECKED(JSObject, holder, 0); 2819 CONVERT_ARG_HANDLE_CHECKED(JSObject, holder, 0);
(...skipping 12438 matching lines...) Expand 10 before | Expand all | Expand 10 after
15259 } 15258 }
15260 return NULL; 15259 return NULL;
15261 } 15260 }
15262 15261
15263 15262
15264 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15263 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15265 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15264 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15266 } 15265 }
15267 15266
15268 } } // namespace v8::internal 15267 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698