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

Side by Side Diff: src/factory.cc

Issue 1417213005: Remove several JSFunction delegator functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/heap/objects-visiting-inl.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 "src/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2271 // Link debug info to function. 2271 // Link debug info to function.
2272 shared->set_debug_info(*debug_info); 2272 shared->set_debug_info(*debug_info);
2273 2273
2274 return debug_info; 2274 return debug_info;
2275 } 2275 }
2276 2276
2277 2277
2278 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, 2278 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee,
2279 int length) { 2279 int length) {
2280 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) || 2280 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) ||
2281 !callee->has_simple_parameters(); 2281 !callee->shared()->has_simple_parameters();
2282 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() 2282 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map()
2283 : isolate()->sloppy_arguments_map(); 2283 : isolate()->sloppy_arguments_map();
2284 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), 2284 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(),
2285 false); 2285 false);
2286 DCHECK(!isolate()->has_pending_exception()); 2286 DCHECK(!isolate()->has_pending_exception());
2287 Handle<JSObject> result = NewJSObjectFromMap(map); 2287 Handle<JSObject> result = NewJSObjectFromMap(map);
2288 Handle<Smi> value(Smi::FromInt(length), isolate()); 2288 Handle<Smi> value(Smi::FromInt(length), isolate());
2289 Object::SetProperty(result, length_string(), value, STRICT).Assert(); 2289 Object::SetProperty(result, length_string(), value, STRICT).Assert();
2290 if (!strict_mode_callee) { 2290 if (!strict_mode_callee) {
2291 Object::SetProperty(result, callee_string(), callee, STRICT).Assert(); 2291 Object::SetProperty(result, callee_string(), callee, STRICT).Assert();
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 } 2402 }
2403 2403
2404 2404
2405 Handle<Object> Factory::ToBoolean(bool value) { 2405 Handle<Object> Factory::ToBoolean(bool value) {
2406 return value ? true_value() : false_value(); 2406 return value ? true_value() : false_value();
2407 } 2407 }
2408 2408
2409 2409
2410 } // namespace internal 2410 } // namespace internal
2411 } // namespace v8 2411 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698