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

Side by Side Diff: src/runtime/runtime-function.cc

Issue 1186733002: Add %TypedArray% to proto chain (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: changes from arv's review Created 5 years, 6 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/harmony-typedarray.js ('k') | src/runtime/runtime-object.cc » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 CONVERT_ARG_CHECKED(JSFunction, fun, 0); 165 CONVERT_ARG_CHECKED(JSFunction, fun, 0);
166 CONVERT_SMI_ARG_CHECKED(length, 1); 166 CONVERT_SMI_ARG_CHECKED(length, 1);
167 RUNTIME_ASSERT((length & 0xC0000000) == 0xC0000000 || 167 RUNTIME_ASSERT((length & 0xC0000000) == 0xC0000000 ||
168 (length & 0xC0000000) == 0x0); 168 (length & 0xC0000000) == 0x0);
169 fun->shared()->set_length(length); 169 fun->shared()->set_length(length);
170 return isolate->heap()->undefined_value(); 170 return isolate->heap()->undefined_value();
171 } 171 }
172 172
173 173
174 // Set the "prototype" property of a constructor Function.
174 RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) { 175 RUNTIME_FUNCTION(Runtime_FunctionSetPrototype) {
175 HandleScope scope(isolate); 176 HandleScope scope(isolate);
176 DCHECK(args.length() == 2); 177 DCHECK(args.length() == 2);
177 178
178 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); 179 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
179 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); 180 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
180 RUNTIME_ASSERT(fun->should_have_prototype()); 181 RUNTIME_ASSERT(fun->should_have_prototype());
181 RETURN_FAILURE_ON_EXCEPTION(isolate, 182 RETURN_FAILURE_ON_EXCEPTION(isolate,
182 Accessors::FunctionSetPrototype(fun, value)); 183 Accessors::FunctionSetPrototype(fun, value));
183 return args[0]; // return TOS 184 return args[0]; // return TOS
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 624
624 625
625 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) { 626 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) {
626 HandleScope scope(isolate); 627 HandleScope scope(isolate);
627 DCHECK(args.length() == 0); 628 DCHECK(args.length() == 0);
628 THROW_NEW_ERROR_RETURN_FAILURE(isolate, 629 THROW_NEW_ERROR_RETURN_FAILURE(isolate,
629 NewTypeError(MessageTemplate::kStrongArity)); 630 NewTypeError(MessageTemplate::kStrongArity));
630 } 631 }
631 } // namespace internal 632 } // namespace internal
632 } // namespace v8 633 } // namespace v8
OLDNEW
« no previous file with comments | « src/harmony-typedarray.js ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698