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

Side by Side Diff: src/factory.cc

Issue 816913003: Implement ES6 rest parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo in ARM port Created 5 years, 10 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
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/full-codegen.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/conversions.h" 9 #include "src/conversions.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 2218
2219 // Link debug info to function. 2219 // Link debug info to function.
2220 shared->set_debug_info(*debug_info); 2220 shared->set_debug_info(*debug_info);
2221 2221
2222 return debug_info; 2222 return debug_info;
2223 } 2223 }
2224 2224
2225 2225
2226 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee, 2226 Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee,
2227 int length) { 2227 int length) {
2228 bool strict_mode_callee = is_strict(callee->shared()->language_mode()); 2228 bool strict_mode_callee = is_strict(callee->shared()->language_mode()) ||
2229 !callee->is_simple_parameter_list();
2229 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map() 2230 Handle<Map> map = strict_mode_callee ? isolate()->strict_arguments_map()
2230 : isolate()->sloppy_arguments_map(); 2231 : isolate()->sloppy_arguments_map();
2231 2232
2232 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(), 2233 AllocationSiteUsageContext context(isolate(), Handle<AllocationSite>(),
2233 false); 2234 false);
2234 DCHECK(!isolate()->has_pending_exception()); 2235 DCHECK(!isolate()->has_pending_exception());
2235 Handle<JSObject> result = NewJSObjectFromMap(map); 2236 Handle<JSObject> result = NewJSObjectFromMap(map);
2236 Handle<Smi> value(Smi::FromInt(length), isolate()); 2237 Handle<Smi> value(Smi::FromInt(length), isolate());
2237 Object::SetProperty(result, length_string(), value, STRICT).Assert(); 2238 Object::SetProperty(result, length_string(), value, STRICT).Assert();
2238 if (!strict_mode_callee) { 2239 if (!strict_mode_callee) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 return Handle<Object>::null(); 2335 return Handle<Object>::null();
2335 } 2336 }
2336 2337
2337 2338
2338 Handle<Object> Factory::ToBoolean(bool value) { 2339 Handle<Object> Factory::ToBoolean(bool value) {
2339 return value ? true_value() : false_value(); 2340 return value ? true_value() : false_value();
2340 } 2341 }
2341 2342
2342 2343
2343 } } // namespace v8::internal 2344 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler/linkage.cc ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698